use of com.checkmarx.flow.controller.ADOController in project cx-flow by checkmarx-ltd.
the class DeleteBranchSteps method initServices.
private void initServices() {
CxScannerService cxScannerService = new CxScannerService(cxProperties, null, flowProperties, cxClientMock, null);
ProjectNameGenerator projectNameGeneratorSpy = spy(new ProjectNameGenerator(helperService, cxScannerService, flowProperties));
initProjectNameGeneratorSpy(projectNameGeneratorSpy);
ScanRequestConverter scanRequestConverter = new ScanRequestConverter(helperService, flowProperties, gitHubService, null, null, null, null, cxClientMock, cxProperties);
SastScanner sastScanner = new SastScanner(null, cxProperties, flowProperties, null, projectNameGeneratorSpy, cxClientMock, new BugTrackersDto(emailService, bugTrackerEventTrigger, gitHubService, null, null, null, null));
List<VulnerabilityScanner> scanners = new LinkedList<>();
scanners.add(sastScanner);
FlowService flowServiceSpy = spy(new FlowService(scanners, projectNameGeneratorSpy, resultsServiceMock));
// gitHubControllerSpy is a spy which will run real methods.
// It will connect to a real github repository to read a real cx.config file
// And thus it will work with real gitHubService
this.gitHubControllerSpy = spy(new GitHubController(gitHubProperties, flowProperties, null, flowServiceSpy, helperService, gitHubService, gitHubAppAuthService, filterFactory, configOverrider, null, gitAuthUrlGenerator));
this.adoControllerSpy = spy(new ADOController(adoProperties, flowProperties, null, flowServiceSpy, helperService, filterFactory, configOverrider, adoServiceMock, scmConfigOverrider, gitAuthUrlGenerator));
}
Aggregations