public class TestConfiguration
extends org.junit.rules.ExternalResource
Usage:
class MyUnitTest extends TestBase {
@ClassRule
public static final TestConfiguration CONFIG = new TestConfiguration("explore.enabled", "false");
....
}
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_PREFIX |
| Constructor and Description |
|---|
TestConfiguration(Map<String,String> configs)
Creates a new instance with the given configurations.
|
TestConfiguration(Object... configs)
Creates a new instance with the give list of configurations.
|
public static final String PROPERTY_PREFIX
public TestConfiguration(Object... configs)
configs - list of configuration pairs.
The list must be in the form of (key1, value1, key2, value2, ...),
hence the length of configs must be even.
The Object.toString() method will be called to obtain the keys and values that go into
the configuration.Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.