use of org.zaproxy.zap.utils.ZapXmlConfiguration in project zaproxy by zaproxy.
the class HttpSenderUnitTest method createOptions.
private static ConnectionParam createOptions() {
ConnectionParam options = new ConnectionParam();
options.load(new ZapXmlConfiguration());
return options;
}
use of org.zaproxy.zap.utils.ZapXmlConfiguration in project zaproxy by zaproxy.
the class WithConfigsTest method setUpZap.
/**
* Sets up ZAP, by initialising the home/installation dirs and core classes (for example, {@link
* Constant}, {@link Control}, {@link Model}).
*
* @throws Exception if an error occurred while setting up the dirs or core classes.
*/
@BeforeEach
void setUpZap() throws Exception {
Constant.setZapInstall(zapInstallDir);
Constant.setZapHome(zapHomeDir);
model = mock(Model.class, withSettings().defaultAnswer(CALLS_REAL_METHODS));
Model.setSingletonForTesting(model);
extensionLoader = mock(ExtensionLoader.class, withSettings().lenient());
// Init all the things
Constant.getInstance();
setUpConstantMessages();
Control.initSingletonForTesting(Model.getSingleton(), extensionLoader);
Model.getSingleton().getOptionsParam().load(new ZapXmlConfiguration());
}
Aggregations