use of org.cactoos.io.Md5DigestOf in project cactoos by yegor256.
the class TextHasStringTest method hasClearDescriptionForFailedTest.
@Test
public void hasClearDescriptionForFailedTest() throws Exception {
final HexOf hex = new HexOf(new Md5DigestOf(new InputOf("Hello World!")));
final Description description = new StringDescription();
final TextHasString matcher = new TextHasString("ed076287532e86365e841e92bfc50d8c6");
matcher.matchesSafely(hex);
matcher.describeMismatchSafely(hex, description);
MatcherAssert.assertThat("Description is not clear ", description.toString(), new StringContains("Text with \"ed076287532e86365e841e92bfc50d8c\""));
}
Aggregations