Class ConfigOverrideValue
java.lang.Object
io.dropwizard.testing.ConfigOverride
ru.vyarus.dropwizard.guice.test.util.ConfigOverrideValue
- All Implemented Interfaces:
ConfigurablePrefix
public class ConfigOverrideValue
extends io.dropwizard.testing.ConfigOverride
implements ConfigurablePrefix
Class is a copy of
ConfigOverrideValue, but with configurable prefix.
This is required for junit 5 extensions because prefix is auto-generated for each test. Must be used with
TestGuiceyAppExtension or
TestDropwizardAppExtension.- Since:
- 06.03.2021
-
Constructor Summary
ConstructorsConstructorDescriptionConfigOverrideValue(String key, Supplier<String> value) Create a config override value. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidMethods inherited from class io.dropwizard.testing.ConfigOverride
config, config, config, config, randomPorts, randomPorts
-
Constructor Details
-
ConfigOverrideValue
Create a config override value.- Parameters:
key- config yaml pathvalue- value
-
-
Method Details
-
setPrefix
- Specified by:
setPrefixin interfaceConfigurablePrefix- Parameters:
prefix- current test's prefix
-
addToSystemProperties
public void addToSystemProperties()- Specified by:
addToSystemPropertiesin classio.dropwizard.testing.ConfigOverride
-
removeFromSystemProperties
public void removeFromSystemProperties()- Specified by:
removeFromSystemPropertiesin classio.dropwizard.testing.ConfigOverride
-