Search in sources :

Example 1 with AuditLogService

use of com.mercedesbenz.sechub.sharedkernel.logging.AuditLogService in project sechub by mercedes-benz.

the class FalsePositiveJobDataServiceTest method before.

@Before
public void before() {
    serviceToTest = new FalsePositiveJobDataService();
    falsePositiveListValidation = mock(FalsePositiveJobDataListValidation.class);
    configService = mock(ScanProjectConfigService.class);
    userInputAssertion = mock(UserInputAssertion.class);
    scanAssertService = mock(ScanAssertService.class);
    auditLogService = mock(AuditLogService.class);
    serviceToTest.falsePositiveJobDataListValidation = falsePositiveListValidation;
    serviceToTest.configService = configService;
    serviceToTest.scanAssertService = scanAssertService;
    serviceToTest.userInputAssertion = userInputAssertion;
    serviceToTest.auditLogService = auditLogService;
    when(falsePositiveListValidation.validate(any(FalsePositiveJobDataList.class))).thenReturn(new ValidationResult());
    /* we mock config service */
    config = new ScanProjectConfig();
    config.setData("{}");
    when(configService.getOrCreate(eq(PROJECT_ID), eq(ScanProjectConfigID.FALSE_POSITIVE_CONFIGURATION), eq(Boolean.FALSE), any())).thenReturn(config);
}
Also used : AuditLogService(com.mercedesbenz.sechub.sharedkernel.logging.AuditLogService) ScanAssertService(com.mercedesbenz.sechub.domain.scan.ScanAssertService) UserInputAssertion(com.mercedesbenz.sechub.sharedkernel.validation.UserInputAssertion) ValidationResult(com.mercedesbenz.sechub.sharedkernel.validation.ValidationResult) Before(org.junit.Before)

Aggregations

ScanAssertService (com.mercedesbenz.sechub.domain.scan.ScanAssertService)1 AuditLogService (com.mercedesbenz.sechub.sharedkernel.logging.AuditLogService)1 UserInputAssertion (com.mercedesbenz.sechub.sharedkernel.validation.UserInputAssertion)1 ValidationResult (com.mercedesbenz.sechub.sharedkernel.validation.ValidationResult)1 Before (org.junit.Before)1