Use Supplier variants of Assert methods

See gh-22699
This commit is contained in:
dreis2211
2020-08-02 09:12:40 +02:00
committed by Stephane Nicoll
parent bb3066f61a
commit e49e2dfff1
17 changed files with 32 additions and 28 deletions

View File

@@ -130,7 +130,7 @@ class LayersIndexTests {
String actualContent = getContent();
String name = "LayersIndexTests-" + LayersIndexTests.this.testMethodName + ".txt";
InputStream in = LayersIndexTests.class.getResourceAsStream(name);
Assert.state(in != null, "Can't read " + name);
Assert.state(in != null, () -> "Can't read " + name);
String expectedContent = new String(FileCopyUtils.copyToByteArray(in), StandardCharsets.UTF_8);
expectedContent = expectedContent.replace("\r", "");
assertThat(actualContent).isEqualTo(expectedContent);