Yuriy
это как ? есть пример ?
public static <T> void assertThat(String reason, T actual, Matcher<? super T> matcher) {
boolean matched = matcher.matches(actual);
Description description = new StringDescription();
description.appendText(reason)
.appendText("\nExpected: ")
.appendDescriptionOf(matcher)
.appendText("\n but: ");
matcher.describeMismatch(actual, description);
Consumer consumer = e -> {
if (!matched){
getSyncConsumer().accept(null);
if(!matcher.matches(actual))
throw new AssertionError(description.toString());
}
};
String message = String.format("Ожидаем, что: %s%s",("".equals(reason)? "": reason + " "), matcher.toString());
step().message(consumer, message);
//step(message, getStepper(consumer));
log.debug("match -> " + matcher.toString());
}