Use Supplier variants of Assert methods
See gh-22699
This commit is contained in:
committed by
Stephane Nicoll
parent
bb3066f61a
commit
e49e2dfff1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user