Use `System.lineSeparator()` instead of `%n` formatting.
Gets rid of a warning saying that `String.format` is being used without any placeholders. Also generally more clear that the test is making a platform-dependent assertion.
@@ -81,7 +81,7 @@ public class StreamedTestOutputTest {
new StreamedTestOutput(OutErr.create(out, err), fileSystem.getPath("/myfile"))) {}
assertThat(out.toString(StandardCharsets.UTF_8.name()))
- .isEqualTo(String.format("included%nlines%n"));
+ .isEqualTo("included" + System.lineSeparator() + "lines" + System.lineSeparator());
assertThat(err.toString(StandardCharsets.UTF_8.name())).isEmpty();
}
