public class ResourceExtension extends Object implements DropwizardExtension
Modifier and Type | Class and Description |
---|---|
static class |
ResourceExtension.Builder
A
ResourceExtension builder which enables configuration of a Jersey testing environment. |
Modifier and Type | Method and Description |
---|---|
void |
after()
Executed after test method or class.
|
void |
before()
Executed before test method or class.
|
static ResourceExtension.Builder |
builder()
Creates a new Jersey testing environment builder for
ResourceExtension |
javax.ws.rs.client.Client |
client()
Returns the pre-configured
Client for this test. |
Consumer<org.glassfish.jersey.client.ClientConfig> |
getClientConfigurator() |
org.glassfish.jersey.test.JerseyTest |
getJerseyTest()
Returns the underlying
JerseyTest . |
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
javax.validation.Validator |
getValidator() |
javax.ws.rs.client.WebTarget |
target(String path)
Creates a web target to be sent to the resource under testing.
|
public static ResourceExtension.Builder builder()
ResourceExtension
ResourceExtension.Builder
public javax.validation.Validator getValidator()
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public Consumer<org.glassfish.jersey.client.ClientConfig> getClientConfigurator()
public javax.ws.rs.client.WebTarget target(String path)
path
- relative path (from tested application base URI) this web target should point to.public javax.ws.rs.client.Client client()
Client
for this test. For sending
requests prefer target(String)
JerseyTest
configured Client
public org.glassfish.jersey.test.JerseyTest getJerseyTest()
JerseyTest
. For sending requests prefer
target(String)
.JerseyTest
public void before() throws Throwable
DropwizardExtension
before
in interface DropwizardExtension
Throwable
public void after() throws Throwable
DropwizardExtension
after
in interface DropwizardExtension
Throwable
Copyright © 2019. All rights reserved.