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, failComparingpublic ExpectationGatherer()
public ExpectationGatherer(boolean showStackTrace)
public void failComparing(String message, CharSequence expected, CharSequence actual, Throwable cause)
FailureStrategyfailComparing in class AbstractFailureStrategypublic void fail(String message, Throwable cause)
FailureStrategyfail in class FailureStrategypublic List<com.google.common.truth.Expect.ExpectationFailure> getMessages()
Copyright © 2017. All rights reserved.