Class PaxExamRule

java.lang.Object
org.codice.ddf.test.common.annotations.PaxExamRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class PaxExamRule extends Object implements org.junit.rules.TestRule
Adds support for BeforeExam and AfterExam annotations with OPS4J Pax Exam integration tests. There should only be one instance of the PaxExamRule for a test class, including its super classes.

 public class TestClass {
    @Rule
     public PaxExamRule paxExamRule = new PaxExamRule(this);

    @BeforeExam
     public void beforeExam() {
         // ...
     }

    @AfterExam
     public void afterExam() {
         // ...
     }
 
  • Field Details

  • Constructor Details

    • PaxExamRule

      public PaxExamRule(Object testInstance)
  • Method Details

    • apply

      public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      Specified by:
      apply in interface org.junit.rules.TestRule