org.ops4j.pax.exam.spi.reactors

Class ReactorManager



  • public class ReactorManagerextends Object
    Manages the exam system and reactor required by a test driver. This class is a singleton and keeps track of all tests in the current test suite and lets a reactor reuse the Exam system and the test probe, where applicable.

    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.

    Author:
    Harald Wellmann
    • Method Detail

      • getInstance

        public static ReactorManager getInstance()
        Returns the singleton ReactorManager instance.
        Returns:
        reactor manager
      • prepareReactor

        public ExamReactor prepareReactor(Class<?> _testClass,                         Object testClassInstance)
        Prepares the unstaged reactor for the given test class instance. Any configurations from Configuration methods of the class are added to the reactor.
        Parameters:
        _testClass - test class
        testClassInstance - instance of test class
        Returns:
        reactor
      • stageReactor

        public StagedExamReactor stageReactor()
        Stages the reactor for the current class.
        Returns:
        staged reactor
      • getNumConfigurations

        public int getNumConfigurations()
        Returns the number of configurations for the current reactor.
        Returns:
        number of configurations
      • createProbeBuilder

        public org.ops4j.pax.exam.TestProbeBuilder createProbeBuilder(Object testClassInstance)                                                       throws IOException,                                                              org.ops4j.pax.exam.ExamConfigurationException
        Lazily creates a probe builder. The same probe builder will be reused for all test classes, unless the default builder is overridden in a given class.
        Parameters:
        testClassInstance - instance of test class
        Returns:
        probe builder
        Throws:
        IOException - when probe cannot be created
        org.ops4j.pax.exam.ExamConfigurationException - when user-defined probe cannot be created
      • getSystemType

        public String getSystemType()
        Returns:
        the systemType
      • lookupTestMethod

        public Object lookupTestMethod(org.ops4j.pax.exam.TestAddress address)
        Looks up a test method for a given address.
        Parameters:
        address - test method address used by probe
        Returns:
        test method wrapper - the type is only known to the test driver.
      • storeTestMethod

        public void storeTestMethod(org.ops4j.pax.exam.TestAddress address,                   Object testMethod)
        Stores the test method wrapper for a given test address
        Parameters:
        address - test method address used by probe
        testMethod - test method wrapper - the type is only known to the test driver
      • inject

        public void inject(Object test)
        Performs field injection on the given test class instance.
        Parameters:
        test - test class instance

Copyright © 2006–2016 OPS4J - Open Participation Software for Java. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14