X - Type of item.M - Type of tested matcher.public final class Mismatches<X,M extends org.hamcrest.Matcher<X>>
extends org.hamcrest.TypeSafeDiagnosingMatcher<M>
Matcher objects.
Here is an example:
new Assertion<>(
"Can't describe a mismatch",
new HasLines("Tom", "Mike"),
new Mismatches<>(
String.format("Tom%nJohn%n"),
"Lines are <[Tom, Mike]>",
"<[Tom, John]>"
)
).affirm();
| Constructor and Description |
|---|
Mismatches(X args,
String expected,
String actual)
Ctor.
|
Mismatches(X args,
org.cactoos.Text message)
Ctor.
|
Mismatches(X args,
org.cactoos.Text expected,
org.cactoos.Text actual)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description desc) |
protected boolean |
matchesSafely(M matcher,
org.hamcrest.Description dsc) |
public Mismatches(X args, String expected, String actual)
args - The testing arguments for the matcher.expected - The expected portion of the mismatch message.actual - The actual portion of the mismatch message.public Mismatches(X args, org.cactoos.Text expected, org.cactoos.Text actual)
args - The testing arguments for the matcher.expected - The expected portion of the mismatch message.actual - The actual portion of the mismatch message.public Mismatches(X args, org.cactoos.Text message)
args - The testing arguments for the matcher.message - The expected mismatch message.Copyright © 2017–2019 jcabi.com. All rights reserved.