Skip to content

Commit

Permalink
switch some given/expected in assert
Browse files Browse the repository at this point in the history
  • Loading branch information
fabapp2 committed Nov 6, 2023
1 parent ae53de5 commit 92811e6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ public void verifyParity(ParserResultParityChecker parserResultParityChecker) {


// Number of parsed sources should always be the same
assertThat(comparingParserResult.sourceFiles().size())
assertThat(testedParserResult.sourceFiles().size())
.as(renderErrorMessage(comparingParserResult, testedParserResult))
.isEqualTo(testedParserResult.sourceFiles().size());
.isEqualTo(comparingParserResult.sourceFiles().size());

// The paths of sources should be the same
List<String> comparingResultPaths = comparingParserResult.sourceFiles().stream().map(sf -> baseDir.resolve(sf.getSourcePath()).toAbsolutePath().normalize().toString()).toList();
Expand Down Expand Up @@ -144,7 +144,7 @@ private void verifyMarkersAreTheSame(RewriteProjectParsingResult comparingParser
SoftAssertions softAssertions = new SoftAssertions();

// Compare
assertThat(comparingMarkersList.get(0))
assertThat(testedMarkersList.get(0))
.usingRecursiveComparison()
.ignoringCollectionOrderInFields("parent.modules")
.ignoringFields(
Expand All @@ -155,7 +155,7 @@ private void verifyMarkersAreTheSame(RewriteProjectParsingResult comparingParser
UUID.class,
// FIXME: https://github.com/spring-projects-experimental/spring-boot-migrator/issues/880
MavenSettings.class)
.isEqualTo(testedMarkersList.get(0));
.isEqualTo(comparingMarkersList.get(0));


comparingMarkersList.forEach(comparingMarker -> {
Expand Down Expand Up @@ -184,7 +184,7 @@ private void verifyMarkersAreTheSame(RewriteProjectParsingResult comparingParser
List<String> comparingClasspath = comparingMarkers.findFirst(JavaSourceSet.class).get().getClasspath().stream().map(JavaType.FullyQualified::getFullyQualifiedName).toList();
List<String> testedClasspath = testedMarkers.findFirst(JavaSourceSet.class).get().getClasspath().stream().map(JavaType.FullyQualified::getFullyQualifiedName).toList();

assertThat(comparingClasspath.size()).isEqualTo(testedClasspath.size());
assertThat(testedClasspath.size()).isEqualTo(comparingClasspath.size());

assertThat(comparingClasspath)
.withFailMessage(() -> {
Expand Down

0 comments on commit 92811e6

Please sign in to comment.