Simplify AssertJ assertions and also make them more readable

See gh-33653
This commit is contained in:
Krzysztof Krason
2022-12-29 17:52:45 +01:00
committed by Moritz Halbritter
parent c9a2b2ab66
commit cf6493f65c
345 changed files with 1258 additions and 1292 deletions

View File

@@ -64,7 +64,7 @@ class TestPrintStream extends PrintStream implements AssertProvider<PrintStreamA
try {
InputStream stream = this.actual.testClass.getResourceAsStream(resource);
String content = FileCopyUtils.copyToString(new InputStreamReader(stream, StandardCharsets.UTF_8));
Assertions.assertThat(this.actual.toString()).isEqualTo(content);
Assertions.assertThat(this.actual).hasToString(content);
}
catch (IOException ex) {
throw new IllegalStateException(ex);