public abstract static class JerseyTestNg.ContainerPerClassTest extends JerseyTestNg
setUp() / tearDown() methods
annotated by TestNG annotations BeforeClass / AfterClass.JerseyTestNg.ContainerPerClassTest, JerseyTestNg.ContainerPerMethodTest| Constructor and Description |
|---|
ContainerPerClassTest() |
ContainerPerClassTest(javax.ws.rs.core.Application jaxrsApplication) |
ContainerPerClassTest(TestContainerFactory testContainerFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected TestNgStrategy |
configureStrategy()
Configure
strategy for this TestNG JerseyTest. |
void |
setUp()
Set up the test by creating a test container instance,
starting it and by creating a new
pre-configured test client. |
void |
tearDown()
Tear down the test by
stopping the test container obtained from the
test container factory and by closing
and discarding the pre-configured test client
that was set up for the test. |
getClient, setClientclient, close, closeIfNotNull, configure, configureClient, configureDeployment, disable, enable, forceDisable, forceEnable, forceSet, getAsyncTimeoutMultiplier, getBaseUri, getLastLoggedRecord, getLoggedRecords, getPort, getTestContainerFactory, isEnabled, set, set, target, targetpublic ContainerPerClassTest()
throws TestContainerException
TestContainerExceptionpublic ContainerPerClassTest(TestContainerFactory testContainerFactory)
public ContainerPerClassTest(javax.ws.rs.core.Application jaxrsApplication)
throws TestContainerException
TestContainerException@BeforeClass
public void setUp()
throws Exception
JerseyTeststarting it and by creating a new
pre-configured test client.
The test container is obtained from the test container factory.setUp in class JerseyTestTestContainerException - if the default test container factory cannot be obtained,
or the test application deployment context is not supported
by the test container factory.Exception - if an exception is thrown during setting up the test environment.@AfterClass
public void tearDown()
throws Exception
JerseyTeststopping the test container obtained from the
test container factory and by closing
and discarding the pre-configured test client
that was set up for the test.tearDown in class JerseyTestException - if an exception is thrown during tearing down the test environment.protected TestNgStrategy configureStrategy()
JerseyTestNgstrategy for this TestNG JerseyTest. The strategy defines
how a test container / client is stored (per class, per thread) and is also responsible for disposing stored instances.configureStrategy in class JerseyTestNgCopyright © 2007-2019, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.