C - the configuration typepublic class DropwizardAppRule<C extends Configuration>
extends org.junit.rules.ExternalResource
By default, the Application will be constructed using reflection to invoke the nullary
constructor. If your application does not provide a public nullary constructor, you will need to
override the newApplication() method to provide your application instance(s).
| Modifier and Type | Class and Description |
|---|---|
static class |
DropwizardAppRule.ServiceListener<T extends Configuration> |
| Constructor and Description |
|---|
DropwizardAppRule(Class<? extends Application<C>> applicationClass,
String configPath,
ConfigOverride... configOverrides) |
DropwizardAppRule(DropwizardTestSupport<C> testSupport) |
| Modifier and Type | Method and Description |
|---|---|
DropwizardAppRule<C> |
addListener(DropwizardAppRule.ServiceListener<C> listener) |
protected void |
after() |
protected void |
before() |
int |
getAdminPort() |
<A extends Application<C>> |
getApplication() |
C |
getConfiguration() |
Environment |
getEnvironment() |
int |
getLocalPort() |
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
DropwizardTestSupport<C> |
getTestSupport() |
DropwizardAppRule<C> |
manage(io.dropwizard.lifecycle.Managed managed) |
Application<C> |
newApplication() |
public DropwizardAppRule(Class<? extends Application<C>> applicationClass, @Nullable String configPath, ConfigOverride... configOverrides)
public DropwizardAppRule(DropwizardTestSupport<C> testSupport)
public DropwizardAppRule<C> addListener(DropwizardAppRule.ServiceListener<C> listener)
public DropwizardAppRule<C> manage(io.dropwizard.lifecycle.Managed managed)
protected void before()
before in class org.junit.rules.ExternalResourceprotected void after()
after in class org.junit.rules.ExternalResourcepublic C getConfiguration()
public int getLocalPort()
public int getAdminPort()
public Application<C> newApplication()
public <A extends Application<C>> A getApplication()
public Environment getEnvironment()
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public DropwizardTestSupport<C> getTestSupport()
Copyright © 2015. All rights reserved.