Skip to content

Commit

Permalink
Improved failedfix line verification (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsra authored Jun 21, 2024
1 parent 3981995 commit adb461a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
codemodType = SonarXXECodemod.class,
testResourceDir = "sonar-xxe-s2755",
renameTestFile = "src/main/java/com/acme/XXEVuln.java",
expectingFailedFixesAtLines = {62},
expectingFixesAtLines = {53, 62, 68},
dependencies = {})
final class SonarXXECodemodTest implements CodemodTestMixin {}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static void verifyExpectedFixes(
List<UnfixedFinding> unfixedFindings = result.getUnfixedFindings();
for (int expectedFailedFixLine : expectingFailedFixesAtLines) {
assertThat(
unfixedFindings.stream().noneMatch(c -> c.getLine() == expectedFailedFixLine), is(true));
unfixedFindings.stream().anyMatch(c -> c.getLine() == expectedFailedFixLine), is(true));
}
}

Expand Down

0 comments on commit adb461a

Please sign in to comment.