Search in sources :

Example 1 with InstallSetup

use of com.mercedesbenz.sechub.domain.scan.InstallSetup in project sechub by mercedes-benz.

the class AbstractInstallSetupProductExecutorTest method before.

@Before
public void before() throws Exception {
    urisForTarget = new ArrayList<>();
    inetAdressesForTarget = new ArrayList<>();
    context = mock(SecHubExecutionContext.class);
    executorContext = mock(ProductExecutorContext.class);
    target1 = new Target(URI_1, TargetType.INTERNET);
    target2 = new Target(URI_2, TargetType.INTRANET);
    target3 = new Target(URI_3, TargetType.INTERNET);
    target4 = new Target(IP_ADRESS1, TargetType.INTRANET);
    targetResolver = mock(TargetResolver.class);
    when(targetResolver.resolveTarget(URI_1)).thenReturn(target1);
    when(targetResolver.resolveTarget(URI_2)).thenReturn(target2);
    when(targetResolver.resolveTarget(URI_3)).thenReturn(target3);
    when(targetResolver.resolveTarget(IP_ADRESS1)).thenReturn(target4);
    when(context.getSechubJobUUID()).thenReturn(UUID.randomUUID());
    installSetup = mock(InstallSetup.class);
    executorToTest = new TestInstallSetupProductExecutor();
    executorToTest.targetResolver = targetResolver;
}
Also used : Target(com.mercedesbenz.sechub.domain.scan.Target) SecHubExecutionContext(com.mercedesbenz.sechub.sharedkernel.execution.SecHubExecutionContext) TargetResolver(com.mercedesbenz.sechub.domain.scan.resolve.TargetResolver) InstallSetup(com.mercedesbenz.sechub.domain.scan.InstallSetup) Before(org.junit.Before)

Aggregations

InstallSetup (com.mercedesbenz.sechub.domain.scan.InstallSetup)1 Target (com.mercedesbenz.sechub.domain.scan.Target)1 TargetResolver (com.mercedesbenz.sechub.domain.scan.resolve.TargetResolver)1 SecHubExecutionContext (com.mercedesbenz.sechub.sharedkernel.execution.SecHubExecutionContext)1 Before (org.junit.Before)1