use of org.zaproxy.zap.utils.ZapXmlConfiguration in project zaproxy by zaproxy.
the class AddOnUnitTest method createZapVersionsXml.
private static ZapXmlConfiguration createZapVersionsXml() throws Exception {
ZapXmlConfiguration zapVersionsXml = new ZapXmlConfiguration(ZAP_VERSIONS_XML);
zapVersionsXml.setExpressionEngine(new XPathExpressionEngine());
return zapVersionsXml;
}
use of org.zaproxy.zap.utils.ZapXmlConfiguration in project zaproxy by zaproxy.
the class AddOnUnitTest method shouldNotDependOnNonDependency.
@Test
void shouldNotDependOnNonDependency() throws Exception {
// Given
ZapXmlConfiguration zapVersionsXml = createZapVersionsXml();
AddOn addOn = createAddOn("AddOn9", zapVersionsXml);
AddOn nonDependency = createAddOn("AddOn3", zapVersionsXml);
// When
boolean depends = addOn.dependsOn(nonDependency);
// Then
assertThat(depends, is(equalTo(false)));
}
use of org.zaproxy.zap.utils.ZapXmlConfiguration in project zaproxy by zaproxy.
the class APIUnitTest method createProxyParam.
@SuppressWarnings("deprecation")
private static org.parosproxy.paros.core.proxy.ProxyParam createProxyParam(String proxyAddress, int proxyPort) {
org.parosproxy.paros.core.proxy.ProxyParam proxyParam = new org.parosproxy.paros.core.proxy.ProxyParam();
proxyParam.load(new ZapXmlConfiguration());
proxyParam.setProxyIp(proxyAddress);
proxyParam.setProxyPort(proxyPort);
return proxyParam;
}
use of org.zaproxy.zap.utils.ZapXmlConfiguration in project zaproxy by zaproxy.
the class OptionsParamApiUnitTest method createOptionsParamApiWithConfig.
private static OptionsParamApi createOptionsParamApiWithConfig() {
OptionsParamApi param = new OptionsParamApi();
param.load(new ZapXmlConfiguration());
return param;
}
use of org.zaproxy.zap.utils.ZapXmlConfiguration in project zaproxy by zaproxy.
the class OptionsParamApiUnitTest method createTestConfigWithInvalidValues.
private static FileConfiguration createTestConfigWithInvalidValues() {
ZapXmlConfiguration config = new ZapXmlConfiguration();
config.setProperty(API_ENABLED_KEY, "Not Boolean");
config.setProperty(API_SECURE_KEY, "Not Boolean");
config.setProperty(API_DISABLEKEY_KEY, "Not Boolean");
config.setProperty(API_INCERRORDETAILS_KEY, "Not Boolean");
config.setProperty(API_AUTOFILLKEY_KEY, "Not Boolean");
config.setProperty(API_ENABLEJSONP_KEY, "Not Boolean");
config.setProperty(API_NO_KEY_FOR_SAFE_OPS, "Not Boolean");
config.setProperty(API_REPORT_PERM_ERRORS, "Not Boolean");
return config;
}
Aggregations