At construction this class will obtain a test container factory, of type {@link TestContainerFactory}, and use that to obtain a configured test container, of type {@link TestContainer}.
Before a test method, in an extending class, is run the {@link TestContainer#start() } method is invoked. After the test method hasrun the {@link TestContainer#stop() } method is invoked.The test method can invoke the {@link #resource() } to obtain a{@link WebResource} from which requests may be sent to and responses receivedfrom the Web application under test.
If a test container factory is not explicitly declared using the appropriate constructor (see {@link #JerseyTest(TestContainerFactory) }) then a default test container factory will be obtained as follows. If the system property {@literal jersey.test.containerFactory} is set and thevalue is a fully qualified class name of a class that extends from {@link TestContainerFactory} then the default test container factory willbe an instance of that class. The exception {@link TestContainerException}will be thrown if the class cannot be loaded or instantiated. If the system property {@literal jersey.test.containerFactory} is not set thenthe default test container factory will be an instance of {@link com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory}. The exception {@link TestContainerException} will be thrown if this class cannot be loaded or instantiated.
The test container is configured from an application descriptor, of type {@link AppDescriptor}. The exception {@link TestContainerException}will be thrown if the test container cannot support the application descriptor. An application descriptor is built from an application descriptor builder. Two application descriptor builders are provided:
The following low-level test container factories are provided:
|
|