Search in sources :

Example 1 with ScanPolicy

use of org.zaproxy.zap.extension.ascan.ScanPolicy in project zaproxy by zaproxy.

the class HostProcessUnitTest method setup.

@BeforeEach
void setup() {
    Constant.messages = new I18N(Locale.ENGLISH);
    rootNode = mock(StructuralNode.class);
    given(rootNode.getName()).willReturn("Sites");
    hostAndPort = "http://localhost:80";
    scanner = mock(Scanner.class);
    given(scanner.isInScope(any())).willReturn(true);
    scannerParam = mock(ScannerParam.class);
    connectionParam = mock(ConnectionParam.class);
    pluginFactory = mock(PluginFactory.class);
    given(pluginFactory.clone()).willReturn(pluginFactory);
    ScanPolicy scanPolicy = mock(ScanPolicy.class);
    given(scanPolicy.getPluginFactory()).willReturn(pluginFactory);
    hostProcess = new HostProcess(hostAndPort, scanner, scannerParam, connectionParam, scanPolicy, ruleConfigParam);
}
Also used : StructuralNode(org.zaproxy.zap.model.StructuralNode) ScanPolicy(org.zaproxy.zap.extension.ascan.ScanPolicy) ConnectionParam(org.parosproxy.paros.network.ConnectionParam) I18N(org.zaproxy.zap.utils.I18N) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)1 ConnectionParam (org.parosproxy.paros.network.ConnectionParam)1 ScanPolicy (org.zaproxy.zap.extension.ascan.ScanPolicy)1 StructuralNode (org.zaproxy.zap.model.StructuralNode)1 I18N (org.zaproxy.zap.utils.I18N)1