use of org.parosproxy.paros.Constant in project zaproxy by zaproxy.
the class PluginFactoryUnitTest method mockConstantClass.
private void mockConstantClass() {
PluginFactory pf = PowerMockito.mock(PluginFactory.class);
Whitebox.setInternalState(pf, "loadedPlugins", null);
Constant constant = PowerMockito.mock(Constant.class);
Whitebox.setInternalState(constant, "instance", constant);
Whitebox.setInternalState(constant, "zapInstall", ".");
I18N i18n = PowerMockito.mock(I18N.class);
given(i18n.getString(anyString())).willReturn("");
given(i18n.getString(anyString(), anyObject())).willReturn("");
Whitebox.setInternalState(constant, "messages", i18n);
Model.getSingleton().getOptionsParam().load(new ZapXmlConfiguration());
}
use of org.parosproxy.paros.Constant in project zaproxy by zaproxy.
the class UsersListModelUnitTest method mockConstantClass.
private void mockConstantClass() {
Constant constant = PowerMockito.mock(Constant.class);
I18N i18n = PowerMockito.mock(I18N.class);
given(i18n.getString(anyString())).willReturn("");
given(i18n.getString(anyString(), anyObject())).willReturn("");
Whitebox.setInternalState(constant, "messages", i18n);
}
use of org.parosproxy.paros.Constant in project zaproxy by zaproxy.
the class UsersTableModelUnitTest method mockConstantClass.
private void mockConstantClass() {
Constant constant = PowerMockito.mock(Constant.class);
I18N i18n = PowerMockito.mock(I18N.class);
given(i18n.getString(anyString())).willReturn("");
given(i18n.getString(anyString(), anyObject())).willReturn("");
Whitebox.setInternalState(constant, "messages", i18n);
}
Aggregations