| java.lang.Object | ||
| ↳ | org.junit.rules.ExternalResource | |
| ↳ | org.ops4j.pax.exam.junit.PaxExamServer | |
JUnit rule for launching a Pax Exam container in server mode for a JUnit test.
Example
public class MyTest {
@Rule
public PaxExamServer exam = new PaxExamServer();
}
This rule starts a Pax Exam container before each test and stops it after the test. The
configuration options for the exam container are taken from a method in the test class annotated
with Configuration. The test class must contain a unique no-args method with this
annotation and with return type Option[].
Alternatively, you can pass a class literal to the PaxExamServer constructor. In this
case, the @Configuration method will be taken from the class argument.
This test rule can be used with any plain old unit test or in combination with other JUnit
runners. Do not use this rule in combination with the PaxExam runner.
PaxExamServer can also be used as a class rule. In this case, test container is started
once before running all tests of the class and is stopped when all tests have run.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.junit.rules.ExternalResource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.junit.rules.TestRule
| |||||||||||
| Exception |
|---|