C - configuration typeTestGuiceyApp@Deprecated
public class GuiceyAppRule<C extends io.dropwizard.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).
Based on DropwizardAppRule, but doesn't start jetty and as a consequence
jersey and guice web modules not initialized. Emulates managed objects lifecycle.
Suppose to be used for testing internal services business logic as lightweight alternative for dropwizard rule.
| Constructor and Description |
|---|
GuiceyAppRule(java.lang.Class<? extends io.dropwizard.Application<C>> applicationClass,
java.lang.String configPath,
io.dropwizard.testing.ConfigOverride... configOverrides)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
after()
Deprecated.
|
protected void |
before()
Deprecated.
|
<A extends io.dropwizard.Application<C>> |
getApplication()
Deprecated.
|
<T> T |
getBean(java.lang.Class<T> type)
Deprecated.
|
C |
getConfiguration()
Deprecated.
|
io.dropwizard.setup.Environment |
getEnvironment()
Deprecated.
|
com.google.inject.Injector |
getInjector()
Deprecated.
|
protected io.dropwizard.Application<C> |
newApplication()
Deprecated.
|
public GuiceyAppRule(java.lang.Class<? extends io.dropwizard.Application<C>> applicationClass, @Nullable java.lang.String configPath, io.dropwizard.testing.ConfigOverride... configOverrides)
public C getConfiguration()
public <A extends io.dropwizard.Application<C>> A getApplication()
public io.dropwizard.setup.Environment getEnvironment()
public com.google.inject.Injector getInjector()
public <T> T getBean(java.lang.Class<T> type)
protected io.dropwizard.Application<C> newApplication()
protected void before()
throws java.lang.Throwable
before in class org.junit.rules.ExternalResourcejava.lang.Throwableprotected void after()
after in class org.junit.rules.ExternalResource