Better unit test assertion.

This commit is contained in:
Gary Gregory 2021-09-28 12:32:27 -04:00
parent 0352f34efe
commit f8115aa301
1 changed files with 2 additions and 2 deletions

View File

@ -266,12 +266,12 @@ public class EmptyPropertiesTest {
try (PrintStream out = new PrintStream(expected)) {
PropertiesFactory.INSTANCE.createProperties().save(out, comments);
}
assertArrayEquals(expected.toByteArray(), actual.toByteArray());
assertArrayEquals(expected.toByteArray(), actual.toByteArray(), () -> new String(expected.toByteArray()));
expected.reset();
try (PrintStream out = new PrintStream(expected)) {
new Properties().save(out, comments);
}
assertArrayEquals(expected.toByteArray(), actual.toByteArray());
assertArrayEquals(expected.toByteArray(), actual.toByteArray(), () -> new String(expected.toByteArray()));
}
}
}