Class ImplementAssertionWithChaining

java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.ImplementAssertionWithChaining
All Implemented Interfaces:
BugChecker.IfTreeMatcher, Suppressible, Serializable

public final class ImplementAssertionWithChaining extends BugChecker implements BugChecker.IfTreeMatcher
Migrates Truth subjects from a manual "test and fail" approach to one using Subject.check(...). For example:

 // Before:
 if (actual().foo() != expected) {
   failWithActual("expected to have foo", expected);
 }

 // After:
 check("foo()").that(actual().foo()).isEqualTo(expected);
 
See Also: