Class WeldTestSupport<C extends io.dropwizard.Configuration>
- java.lang.Object
-
- io.dropwizard.testing.DropwizardTestSupport<C>
-
- org.sdase.commons.server.weld.testing.WeldTestSupport<C>
-
public class WeldTestSupport<C extends io.dropwizard.Configuration> extends io.dropwizard.testing.DropwizardTestSupport<C>
Test support extension that uses WELD to inject the application class.Example usage:
@RegisterExtension static final DropwizardAppExtension<AppConfiguration> EXTENSION = new DropwizardAppExtension<>( new WeldTestSupport<>(Application.class, ResourceHelpers.resourceFilePath("config.yml")));
-
-
Constructor Summary
Constructors Constructor Description WeldTestSupport(java.lang.Class<? extends io.dropwizard.Application<C>> applicationClass, C configuration)
WeldTestSupport(java.lang.Class<? extends io.dropwizard.Application<C>> applicationClass, java.lang.String configPath, io.dropwizard.testing.ConfigOverride... configOverrides)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
after()
io.dropwizard.Application<C>
newApplication()
-
-
-
Constructor Detail
-
WeldTestSupport
public WeldTestSupport(java.lang.Class<? extends io.dropwizard.Application<C>> applicationClass, @Nullable java.lang.String configPath, io.dropwizard.testing.ConfigOverride... configOverrides)
-
-
Method Detail
-
newApplication
public io.dropwizard.Application<C> newApplication()
- Overrides:
newApplication
in classio.dropwizard.testing.DropwizardTestSupport<C extends io.dropwizard.Configuration>
-
after
public void after()
- Overrides:
after
in classio.dropwizard.testing.DropwizardTestSupport<C extends io.dropwizard.Configuration>
-
-