Skip to content

Commit a01c636

Browse files
fixing testcase testShowPredicates()
1 parent aa6d347 commit a01c636

File tree

1 file changed

+4
-1
lines changed
  • src/test/java/com/checkmarx/intellij/integration/standard/commands

1 file changed

+4
-1
lines changed

src/test/java/com/checkmarx/intellij/integration/standard/commands/TestTriage.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ public void testShowPredicates() {
3030

3131
CompletableFuture<ResultGetState> getFuture = Results.getResults(Environment.SCAN_ID);
3232
ResultGetState results = Assertions.assertDoesNotThrow((ThrowingSupplier<ResultGetState>) getFuture::get);
33-
Result result = results.getResultOutput().getResults().get(0);
33+
Result result = results.getResultOutput().getResults().stream()
34+
.filter(res -> !res.getType().equalsIgnoreCase(Constants.SCAN_TYPE_SCA))
35+
.findFirst()
36+
.orElseThrow(() -> new AssertionError("No triage-supported results found (excluding SCA)"));
3437
Assertions.assertDoesNotThrow(() -> triageShow(UUID.fromString(project.getId()), result.getSimilarityId(), result.getType()));
3538
}
3639

0 commit comments

Comments
 (0)