/** * Get the JAX-RS test client that is {@link #configureClient(org.glassfish.jersey.client.ClientConfig) pre-configured} * for this test. * * @return the configured test client. */ public final Client client() { return getClient(); }
/** * Set up the test by creating a test container instance, {@link TestContainer#start() starting} it and by creating a new * {@link #configureClient(org.glassfish.jersey.client.ClientConfig) pre-configured} test client. * The test container is obtained from the {@link #getTestContainerFactory() test container factory}. * * @throws TestContainerException if the default test container factory cannot be obtained, * or the test application deployment context is not supported * by the test container factory. * @throws Exception if an exception is thrown during setting up the test environment. */ @Before public void setUp() throws Exception { if (isLogRecordingEnabled()) { registerLogHandler(); } final TestContainer testContainer = createTestContainer(context); // Set current instance of test container and start it. setTestContainer(testContainer); testContainer.start(); // Create an set new client. setClient(getClient(testContainer.getClientConfig())); }
/** * Get the JAX-RS test client that is {@link #configureClient(org.glassfish.jersey.client.ClientConfig) pre-configured} * for this test. * * @return the configured test client. */ public final Client client() { return getClient(); }
/** * Set up the test by creating a test container instance, {@link TestContainer#start() starting} it and by creating a new * {@link #configureClient(org.glassfish.jersey.client.ClientConfig) pre-configured} test client. * The test container is obtained from the {@link #getTestContainerFactory() test container factory}. * * @throws TestContainerException if the default test container factory cannot be obtained, * or the test application deployment context is not supported * by the test container factory. * @throws Exception if an exception is thrown during setting up the test environment. */ @Before public void setUp() throws Exception { if (isLogRecordingEnabled()) { registerLogHandler(); } final TestContainer testContainer = createTestContainer(context); // Set current instance of test container and start it. setTestContainer(testContainer); testContainer.start(); // Create an set new client. setClient(getClient(testContainer.getClientConfig())); }