Skip to content

Commit 316ce36

Browse files
committed
Use fluent .actual() in test assertion
1 parent 1c4a8ca commit 316ce36

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,13 +548,12 @@ void addsMapstructProcessorWhenLombokAndMapstructUsedWithoutAnnotationProcessorP
548548
</dependencies>
549549
</project>
550550
""",
551-
spec -> spec.after(actual -> {
552-
assertThat(actual)
553-
.as("mapstruct-processor is added to the annotation processor paths, matching the upgraded mapstruct version")
554-
.containsPattern(Pattern.compile("<artifactId>mapstruct-processor</artifactId>\\s*<version>1\\.6\\.\\d+(\\.\\w+)?</version>"))
555-
.contains("<artifactId>lombok-mapstruct-binding</artifactId>");
556-
return actual;
557-
})
551+
spec -> spec.after(actual ->
552+
assertThat(actual)
553+
.as("mapstruct-processor is added to the annotation processor paths, matching the upgraded mapstruct version")
554+
.containsPattern(Pattern.compile("<artifactId>mapstruct-processor</artifactId>\\s*<version>1\\.6\\.\\d+(\\.\\w+)?</version>"))
555+
.contains("<artifactId>lombok-mapstruct-binding</artifactId>")
556+
.actual())
558557
)
559558
);
560559
}

0 commit comments

Comments
 (0)