use of com.mercedesbenz.sechub.sharedkernel.util.ArchiveSupportProvider in project sechub by mercedes-benz.
the class SchedulerSourcecodeUploadServiceTest method beforeEach.
@BeforeEach
void beforeEach() {
randomUuid = UUID.randomUUID();
mockedChecksumService = mock(ChecksumSHA256Service.class);
mockedStorageService = mock(StorageService.class);
mockedAssertService = mock(ScheduleAssertService.class);
ScheduleSecHubJob job = new ScheduleSecHubJob();
when(mockedAssertService.assertJob(PROJECT1, randomUuid)).thenReturn(job);
storage = mock(JobStorage.class);
when(mockedStorageService.getJobStorage(PROJECT1, randomUuid)).thenReturn(storage);
file = mock(MultipartFile.class);
archiveSupportProvider = mock(ArchiveSupportProvider.class);
mockedArchiveSupport = mock(ArchiveSupport.class);
when(archiveSupportProvider.getArchiveSupport()).thenReturn(mockedArchiveSupport);
configuration = mock(SchedulerSourcecodeUploadConfiguration.class);
/* attach at service to test */
serviceToTest = new SchedulerSourcecodeUploadService();
serviceToTest.checksumSHA256Service = mockedChecksumService;
serviceToTest.storageService = mockedStorageService;
serviceToTest.assertService = mockedAssertService;
serviceToTest.archiveSupportProvider = archiveSupportProvider;
serviceToTest.configuration = configuration;
serviceToTest.logSanitizer = mock(LogSanitizer.class);
serviceToTest.assertion = mock(UserInputAssertion.class);
serviceToTest.auditLogService = mock(AuditLogService.class);
}
Aggregations