public abstract static class JerseyTestNg.ContainerPerMethodTest extends JerseyTestNg
setUp() / tearDown() methods
annotated by TestNG annotations BeforeMethod / AfterMethod.JerseyTestNg.ContainerPerClassTest, JerseyTestNg.ContainerPerMethodTest| Constructor and Description |
|---|
JerseyTestNg.ContainerPerMethodTest() |
JerseyTestNg.ContainerPerMethodTest(Application jaxrsApplication) |
JerseyTestNg.ContainerPerMethodTest(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. |
client, close, closeIfNotNull, configure, configureClient, configureDeployment, disable, enable, forceDisable, forceEnable, forceSet, getAsyncTimeoutMultiplier, getBaseUri, getLastLoggedRecord, getLoggedRecords, getPort, getTestContainerFactory, isEnabled, set, set, target, targetpublic JerseyTestNg.ContainerPerMethodTest()
throws TestContainerException
TestContainerExceptionpublic JerseyTestNg.ContainerPerMethodTest(TestContainerFactory testContainerFactory)
public JerseyTestNg.ContainerPerMethodTest(Application jaxrsApplication) throws TestContainerException
TestContainerExceptionpublic 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.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-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.