use of org.apache.commons.configuration.FileConfiguration in project zaproxy by zaproxy.
the class ExtensionParamUnitTest method shouldHaveLoadedConfigsAfterCloning.
@Test
public void shouldHaveLoadedConfigsAfterCloning() {
// Given
ExtensionParam param = new ExtensionParam();
FileConfiguration config = createTestConfig(false, true, false);
param.load(config);
// When
ExtensionParam clone = param.clone();
// Then
assertThat(clone.isExtensionEnabled("Extension 1"), is(equalTo(false)));
assertThat(clone.isExtensionEnabled("Extension 2"), is(equalTo(true)));
assertThat(clone.isExtensionEnabled("Extension 3"), is(equalTo(false)));
}
use of org.apache.commons.configuration.FileConfiguration in project zaproxy by zaproxy.
the class AbstractParamUnitTest method shouldHaveLoadedConfigsAfterCloning.
@Test
public void shouldHaveLoadedConfigsAfterCloning() {
// Given
TestAbstractParam param = createTestAbstractParam();
FileConfiguration config = createTestConfig();
param.load(config);
// When
TestAbstractParam clone = param.clone();
// Then
assertThat(clone, is(not(equalTo(null))));
assertThat(clone.getValue(), is(equalTo(VALUE)));
assertThat(clone.getValues(), is(equalTo(VALUES)));
}
use of org.apache.commons.configuration.FileConfiguration in project zaproxy by zaproxy.
the class AbstractParamUnitTest method shouldParseLoadedFileConfiguration.
@Test
public void shouldParseLoadedFileConfiguration() {
// Given
TestAbstractParam param = createTestAbstractParam();
FileConfiguration config = createTestConfig();
// When
param.load(config);
// Then
assertThat(param.getValue(), is(equalTo(VALUE)));
assertThat(param.getValues(), is(equalTo(VALUES)));
}
Aggregations