Class and Description |
---|
org.sdase.commons.server.testing.DropwizardRuleHelper
Prefer the original
DropwizardAppRule and a config file with the following
minimal content:
|
org.sdase.commons.server.testing.LazyRule
Use
ConfigOverride.config(String, Supplier) instead.
The above example can be written as:
class MyTest { private static final WireMockClassRule WIRE = new WireMockClassRule(wireMockConfig().dynamicPort()); private static final DropwizardAppRule<AppConfiguration> DW = new DropwizardAppRule<>( TestApplication.class, ResourceHelpers.resourceFilePath("test-config.yml"), ConfigOverride.config("url", WIRE::baseUrl)); // or ConfigOverride.config("url", () -> WIRE.baseUrl())); @ClassRule public static final RuleChain CHAIN = RuleChain.outerRule(WIRE).around(DW); } |