For assertions made _inside the implementation of another assertion_, migrate from assertThat to check.
For example:
assertThat(actual().foo()).isEqualTo(expected);
becomes:
check("foo()").that(actual().foo()).isEqualTo(expected);
More information:
[]
Tested:
[] --sample for global presubmit queue
[]
@@ -73,7 +73,7 @@ final class TemplateRegistrySubject extends Subject<TemplateRegistrySubject, Tem
}
void definedAt(SourceLocation srcLocation) {
- Truth.assertThat(actual().getSourceLocation()).isEqualTo(srcLocation);
+ check("getSourceLocation()").that(actual().getSourceLocation()).isEqualTo(srcLocation);
}
}
