use of com.mercedesbenz.sechub.sharedkernel.SystemEnvironment in project sechub by mercedes-benz.
the class DefaultExecutorConfigSupportTest method before.
@Before
public void before() throws Exception {
config = mock(ProductExecutorConfig.class);
setup = mock(ProductExecutorConfigSetup.class);
jobParameters = new ArrayList<>();
jobParameters.add(new ProductExecutorConfigSetupJobParameter("key1", "value1"));
jobParameters.add(new ProductExecutorConfigSetupJobParameter("key2", "2"));
jobParameters.add(new ProductExecutorConfigSetupJobParameter("key3", "true"));
jobParameters.add(new ProductExecutorConfigSetupJobParameter("key4", "false"));
jobParameters.add(new ProductExecutorConfigSetupJobParameter("key5", "TRUE"));
jobParameters.add(new ProductExecutorConfigSetupJobParameter("key6", null));
when(config.getSetup()).thenReturn(setup);
credentialsInConfigSetup = new ProductExecutorConfigSetupCredentials();
when(setup.getCredentials()).thenReturn(credentialsInConfigSetup);
when(setup.getJobParameters()).thenReturn(jobParameters);
systemEnvironment = mock(SystemEnvironment.class);
supportToTest = new DefaultExecutorConfigSupport(config, systemEnvironment, null);
}
use of com.mercedesbenz.sechub.sharedkernel.SystemEnvironment in project sechub by mercedes-benz.
the class PDSExecutorConfigSuppportTest method before.
@Before
public void before() throws Exception {
config = mock(ProductExecutorConfig.class);
setup = mock(ProductExecutorConfigSetup.class);
jobParameters = new ArrayList<>();
jobParameters.add(new ProductExecutorConfigSetupJobParameter(PDSConfigDataKeyProvider.PDS_CONFIG_PRODUCTIDENTIFIER.getKey().getId(), CONFIGURED_PDS_PRODUCT_IDENTIFIER));
jobParameters.add(new ProductExecutorConfigSetupJobParameter(SecHubProductExecutionPDSKeyProvider.PDS_FORBIDS_TARGETTYPE_INTERNET.getKey().getId(), "true"));
jobParameters.add(new ProductExecutorConfigSetupJobParameter(SecHubProductExecutionPDSKeyProvider.PDS_FORBIDS_TARGETTYPE_INTRANET.getKey().getId(), "false"));
when(config.getSetup()).thenReturn(setup);
credentialsInConfigSetup = new ProductExecutorConfigSetupCredentials();
when(setup.getCredentials()).thenReturn(credentialsInConfigSetup);
when(setup.getJobParameters()).thenReturn(jobParameters);
systemEnvironment = mock(SystemEnvironment.class);
supportToTest = PDSExecutorConfigSuppport.createSupportAndAssertConfigValid(config, systemEnvironment);
}
Aggregations