use of com.checkmarx.sdk.dto.AstScaResults in project cx-flow by checkmarx-ltd.
the class ScaThresholdsSteps method initMock.
private void initMock() {
setDefaultFindings();
SCAResults scaResults = getFakeSCAResults(DEFAULT_FINDINGS_CONFIG);
AstScaResults wrapper = new AstScaResults();
wrapper.setScaResults(scaResults);
when(scaClientMock.getLatestScanResults(any())).thenReturn(wrapper);
}
use of com.checkmarx.sdk.dto.AstScaResults in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method testMissingResultsCase.
/**
* Make sure that SCA results are null in different expected cases.
*/
private void testMissingResultsCase(String projectName) {
log.info("Checking that scaResults are null for the {} project", projectName);
RestClientConfig config = initScaConfig(false);
config.setProjectName(projectName);
AstScaResults latestResults = getLatestResults(config);
Assert.assertNotNull("scanResults must not be null.", latestResults);
Assert.assertNull("scaResults must be null.", latestResults.getScaResults());
}
use of com.checkmarx.sdk.dto.AstScaResults in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method getLatestScanResults_existingResults.
@Test
public void getLatestScanResults_existingResults() {
RestClientConfig config = initScaConfig(false);
AstScaResults latestResults = getLatestResults(config);
verifyScanResults(latestResults);
}
use of com.checkmarx.sdk.dto.AstScaResults in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method scan_localDirUpload.
@Test
public void scan_localDirUpload() throws IOException, ScannerRuntimeException {
RestClientConfig config = initScaConfig(false);
config.getScaConfig().setSourceLocationType(SourceLocationType.LOCAL_DIRECTORY);
Path sourcesDir = null;
try {
sourcesDir = extractTestProjectFromResources();
config.setSourceDir(sourcesDir.toString());
AstScaResults scanResults = runScan(config);
verifyScanResults(scanResults);
} finally {
deleteDir(sourcesDir);
}
}
use of com.checkmarx.sdk.dto.AstScaResults in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class AstTest method scan_remotePublicRepo.
@Test
public void scan_remotePublicRepo() throws MalformedURLException {
RestClientConfig config = getScanConfig();
AstScanner scanner = getScanner();
AstScaResults scanResults = scanner.scan(toSdkScanParams(config));
validateFinalResults(scanResults);
}
Aggregations