public class ReactorManager extends Object
This class was factored out from the JUnit4TestRunner of Pax Exam 2.x and does not depend on JUnit.
TODO check if there are any concurrency issues. Some methods are synchronized, which is just inherited from the 2.1.0 implementation. The use cases are not quite clear.
| Modifier and Type | Method and Description |
|---|---|
void |
afterClass(StagedExamReactor stagedReactor,
Class<?> klass) |
void |
afterSuite(StagedExamReactor stagedReactor) |
void |
beforeClass(StagedExamReactor stagedReactor,
Object testClassInstance) |
void |
beforeSuite(StagedExamReactor stagedReactor) |
org.ops4j.pax.exam.TestProbeBuilder |
createProbeBuilder(Object testClassInstance)
Lazily creates a probe builder.
|
static ReactorManager |
getInstance()
Returns the singleton ReactorManager instance.
|
int |
getNumConfigurations()
Returns the number of configurations for the current reactor.
|
String |
getSystemType() |
void |
inject(Object test)
Performs field injection on the given test class instance.
|
Object |
lookupTestMethod(org.ops4j.pax.exam.TestAddress address)
Looks up a test method for a given address.
|
ExamReactor |
prepareReactor(Class<?> _testClass,
Object testClassInstance)
Prepares the unstaged reactor for the given test class instance.
|
StagedExamReactor |
stageReactor()
Stages the reactor for the current class.
|
void |
storeTestMethod(org.ops4j.pax.exam.TestAddress address,
Object testMethod)
Stores the test method wrapper for a given test address
|
public static ReactorManager getInstance()
public ExamReactor prepareReactor(Class<?> _testClass, Object testClassInstance)
Configuration methods of the class are added to the reactor._testClass - test classtestClassInstance - instance of test classpublic StagedExamReactor stageReactor()
public int getNumConfigurations()
public org.ops4j.pax.exam.TestProbeBuilder createProbeBuilder(Object testClassInstance) throws IOException, org.ops4j.pax.exam.ExamConfigurationException
testClassInstance - instance of test classIOException - when probe cannot be createdorg.ops4j.pax.exam.ExamConfigurationException - when user-defined probe cannot be createdpublic String getSystemType()
public Object lookupTestMethod(org.ops4j.pax.exam.TestAddress address)
address - test method address used by probepublic void storeTestMethod(org.ops4j.pax.exam.TestAddress address,
Object testMethod)
address - test method address used by probetestMethod - test method wrapper - the type is only known to the test driverpublic void beforeSuite(StagedExamReactor stagedReactor)
public void afterSuite(StagedExamReactor stagedReactor)
public void afterClass(StagedExamReactor stagedReactor, Class<?> klass)
public void beforeClass(StagedExamReactor stagedReactor, Object testClassInstance)
public void inject(Object test)
test - test class instanceCopyright © 2006–2017 OPS4J - Open Participation Software for Java. All rights reserved.