|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.fighterfish.test.util.AbstractTestObject
public abstract class AbstractTestObject
RunWith annotation with a value of
JUnit4TestRunner. We have also set ExamReactorStrategy as EagerSingleStagedReactorFactory
which means for every test method invocation, a new test container instance won't be created. Pax-Exam will create a
new test container instance for each TestClass and reuse it for every test method found in that class. Each test
can optionally configure the test container by having one or more configuration methods. Each such method must be
annotated with Configuration and return an array of Option. The options returned by such a method
is used to configure the OSGi framework that's going to be launched by PAX-EXAM. If a test has more than one such
methods, then pax-exam will create multiple test container and run the test in each such container.
Most of our tests require the OSGi platform to be configured similarly, so we provide this base class as
a convenience for our tests. In a lot of way, this shields individual tests from pax-exam details.
In addition to providing pax-exam contracts, it also provides some helper methods
which are needed in every test.
It is not mandatory for tests to extend this class.| Field Summary | |
|---|---|
protected org.osgi.framework.BundleContext |
ctx
|
| Constructor Summary | |
|---|---|
AbstractTestObject()
|
|
| Method Summary | |
|---|---|
org.ops4j.pax.exam.Option[] |
getPaxExamConfiguration()
PaxExamJunit driver treats methods in Junit Test class annotated with @Configuration specially. |
protected java.lang.Long |
getTimeout()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Inject protected org.osgi.framework.BundleContext ctx
| Constructor Detail |
|---|
public AbstractTestObject()
| Method Detail |
|---|
public org.ops4j.pax.exam.Option[] getPaxExamConfiguration()
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Long getTimeout()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||