StandardSubjectBuilder.forCustomFailureStrategy(new AbstractFailureStrategy() { ... })
instead of Expect.create(new ExpectationGatherer() { ... })
. Or, if you're testing
that assertions on a custom Subject
fail (using ExpectationGatherer
to
capture the failures), use ExpectFailure
.@Deprecated public static class Expect.ExpectationGatherer extends AbstractFailureStrategy
Constructor and Description |
---|
ExpectationGatherer()
Deprecated.
|
ExpectationGatherer(boolean showStackTrace)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
fail(String message,
Throwable cause)
Deprecated.
Report an assertion failure with a text message and a throwable that indicates the cause of the
failure.
|
void |
failComparing(String message,
CharSequence expected,
CharSequence actual,
Throwable cause)
Deprecated.
Convenience method to report string-comparison failures with more detail (e.g.
|
List<com.google.common.truth.Expect.ExpectationFailure> |
getMessages()
Deprecated.
|
String |
toString()
Deprecated.
|
fail, failComparing
public ExpectationGatherer()
public ExpectationGatherer(boolean showStackTrace)
public void failComparing(String message, CharSequence expected, CharSequence actual, Throwable cause)
FailureStrategy
failComparing
in class AbstractFailureStrategy
public void fail(String message, Throwable cause)
FailureStrategy
fail
in class FailureStrategy
public List<com.google.common.truth.Expect.ExpectationFailure> getMessages()
Copyright © 2017. All rights reserved.