File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/test/java/com/checkmarx/ast Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ void testResultsJSON() throws Exception {
3636 List <Scan > scanList = wrapper .scanList ("statuses=Completed" );
3737 Assertions .assertTrue (scanList .size () > 0 );
3838 String scanId = scanList .get (0 ).getId ();
39- String results = wrapper .results (UUID .fromString (scanId ), ReportFormat .json );
39+ String results = wrapper .results (UUID .fromString (scanId ), ReportFormat .json , "java-wrapper" );
4040 Assertions .assertTrue (results .length () > 0 );
4141 }
4242
@@ -53,9 +53,13 @@ void testResultsSummaryJSON() throws Exception {
5353 void testResultsStructure () throws Exception {
5454 List <Scan > scanList = wrapper .scanList ("statuses=Completed" );
5555 Assertions .assertTrue (scanList .size () > 0 );
56- String scanId = scanList .get (0 ).getId ();
57- Results results = wrapper .results (UUID .fromString (scanId ));
58- Assertions .assertEquals (results .getTotalCount (), results .getResults ().size ());
56+ for (Scan scan : scanList ) {
57+ Results results = wrapper .results (UUID .fromString (scan .getId ()));
58+ if (results != null && results .getResults () != null ) {
59+ Assertions .assertEquals (results .getTotalCount (), results .getResults ().size ());
60+ break ;
61+ }
62+ }
5963 }
6064
6165 @ Test ()
You can’t perform that action at this time.
0 commit comments