use of com.mercedesbenz.sechub.commons.model.SecHubWebScanConfiguration in project sechub by mercedes-benz.
the class NetsparkerProductExecutorTest method prepareWebScanWithOneInternetURI.
private void prepareWebScanWithOneInternetURI() throws URISyntaxException, SecHubExecutionException {
SecHubWebScanConfiguration webscan = mock(SecHubWebScanConfiguration.class);
when(config.getWebScan()).thenReturn(Optional.of(webscan));
URI uri = URI_1_INTERNET;
when(webscan.getUri()).thenReturn(uri);
}
use of com.mercedesbenz.sechub.commons.model.SecHubWebScanConfiguration in project sechub by mercedes-benz.
the class SecHubConfigurationValidatorTest method webconfig_with_uri_as_https_is_NOT_rejected.
@Test
public void webconfig_with_uri_as_https_is_NOT_rejected() throws Exception {
/* prepare */
SecHubWebScanConfiguration webscan = mock(SecHubWebScanConfiguration.class);
URI uri = URI.create("https://www.example.com");
when(webscan.getUri()).thenReturn(uri);
when(target.getWebScan()).thenReturn(Optional.of(webscan));
/* execute */
validatorToTest.validate(target, errors);
assertNoIllegalSchemaError();
}
use of com.mercedesbenz.sechub.commons.model.SecHubWebScanConfiguration in project sechub by mercedes-benz.
the class SecHubConfigurationValidatorTest method webconfig_with_uri_as_http_is_NOT_rejected.
@Test
public void webconfig_with_uri_as_http_is_NOT_rejected() throws Exception {
/* prepare */
SecHubWebScanConfiguration webscan = mock(SecHubWebScanConfiguration.class);
URI uri = URI.create("http://www.example.com");
when(webscan.getUri()).thenReturn(uri);
when(target.getWebScan()).thenReturn(Optional.of(webscan));
/* execute */
validatorToTest.validate(target, errors);
assertNoIllegalSchemaError();
}
Aggregations