Skip to content

Commit

Permalink
Excavator: Prefer AssertJ (#1260)
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot authored Oct 28, 2024
1 parent 5fd77a4 commit 0b82090
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void no_changes_same_as_old_with_new_line() {
List<String> newPropsLines = CheckOverbroadConstraints.generateUpdatedPropsLines(oldToNewLines, propsLines);
assertThat(newPropsLines)
.as("No changes in old to new lines so new should be unchanged from old")
.isEqualTo(propsLines);
.containsExactlyElementsOf(propsLines);
}

@Test
Expand All @@ -93,7 +93,7 @@ void all_changes_new_line_preserved() {
List<String> newPropsLines = CheckOverbroadConstraints.generateUpdatedPropsLines(oldToNewLines, propsLines);
assertThat(newPropsLines)
.as("All lines changed and in order, new line is preserved")
.isEqualTo(expectedNewPropsLines);
.containsExactlyElementsOf(expectedNewPropsLines);
}

@Test
Expand All @@ -112,7 +112,7 @@ void all_changes_no_new_line() {
List<String> newPropsLines = CheckOverbroadConstraints.generateUpdatedPropsLines(oldToNewLines, propsLines);
assertThat(newPropsLines)
.as("All lines changed and in order, no new line is added")
.isEqualTo(expectedNewPropsLines);
.containsExactlyElementsOf(expectedNewPropsLines);
}

@Test
Expand All @@ -125,7 +125,7 @@ void insert_in_the_middle_in_order() {
List<String> newPropsLines = CheckOverbroadConstraints.generateUpdatedPropsLines(oldToNewLines, propsLines);
assertThat(newPropsLines)
.as("Inserts in middle of the list, new line is preserved")
.isEqualTo(expectedNewPropsLines);
.containsExactlyElementsOf(expectedNewPropsLines);
}

private static Stream<Arguments> provideTestCases() {
Expand Down Expand Up @@ -313,7 +313,7 @@ public List<String> newPropsLines() {
assertThat(CheckOverbroadConstraints.generateUpdatedPropsLines(checkOldToNewLines, newPropsLines))
.as("running check over-broad constraints a second time should not make any changes to the"
+ " props file")
.isEqualTo(newPropsLines);
.containsExactlyElementsOf(newPropsLines);

return newPropsLines;
}
Expand Down

0 comments on commit 0b82090

Please sign in to comment.