use of com.mercedesbenz.sechub.sharedkernel.validation.URIValidation in project sechub by mercedes-benz.
the class ProjectUpdateWhitelistServiceTest method before.
@Before
public void before() throws Exception {
serviceToTest = new ProjectUpdateWhitelistService();
repository = mock(ProjectRepository.class);
eventBus = mock(DomainMessageService.class);
uriValidation = mock(URIValidation.class);
serviceToTest.repository = repository;
serviceToTest.auditLog = mock(AuditLogService.class);
serviceToTest.assertion = mock(UserInputAssertion.class);
serviceToTest.eventBus = eventBus;
serviceToTest.uriValidation = uriValidation;
serviceToTest.logSanitizer = mock(LogSanitizer.class);
project = mock(Project.class);
whitelist = new LinkedHashSet<>();
whitelist.add(new URI("127.0.0.1"));
when(project.getWhiteList()).thenReturn(whitelist);
when(uriValidation.validate(any())).thenReturn(new ValidationResult());
}
Aggregations