Class PaxExam

  • All Implemented Interfaces:
    org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

    public class PaxExamextends org.junit.runner.Runnerimplements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable
    Default JUnit runner for Pax Exam. To use this runner, annotate your test class with @RunWith(PaxExam.class).

    The optional class-level annotation @ExamReactorStrategy defines the restart behaviour of the test reactor which defaults to PerMethod in OSGi mode and to PerSuite otherwise.

    The test class may contain one or more methods annotated by @Configuration, returning a list of options for configuring the test container.

    If there is more than one configuration method, each test method is run for each configuration.

    The JUnit annotations @Rule, @Before, @After work as expected, the corresponding actions are executed within the Pax Exam test container.

    The JUnit annotations @BeforeClass, @AfterClass are of limited use only: The corresponding actions will be executed in the driver, but not in the Pax Exam test container.)

    The javax.inject.Inject annotation can be used on fields to inject dependencies into the test class. In Java EE and CDI modes, injection is performed by the CDI bean manager. In web mode, injection is performed by CDI or by Spring, depending on the configured injector.

    In OSGi mode, Pax Exam injects OSGi services, obtained from the service registry with the default Pax Exam system timeout. The optional @Filter annotation can be used on an injection point to define an LDAP filter or to customize the timeout.

    For parameterized tests, use PaxExamParameterized instead of this runner.

    Harald Wellmann
    • Constructor Detail

      • PaxExam

        public PaxExam(Class<?> klass)        throws org.junit.runners.model.InitializationError
    • Method Detail

      • getDescription

        public org.junit.runner.Description getDescription()
        Specified by:
        getDescription in interface org.junit.runner.Describable
        Specified by:
        getDescription in class org.junit.runner.Runner
      • run

        public void run(org.junit.runner.notification.RunNotifier notifier)
        Specified by:
        run in class org.junit.runner.Runner
      • filter

        public void filter(org.junit.runner.manipulation.Filter filter)            throws org.junit.runner.manipulation.NoTestsRemainException
        Specified by:
        filter in interface org.junit.runner.manipulation.Filterable
      • sort

        public void sort(org.junit.runner.manipulation.Sorter sorter)
        Specified by:
        sort in interface org.junit.runner.manipulation.Sortable

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

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