mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 19:20:44 +02:00
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: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=245750144
This commit is contained in:
parent
8daca56024
commit
de5f3e6177
1 changed files with 3 additions and 2 deletions
|
@ -17,7 +17,6 @@ package google.registry.testing;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Strings.lenientFormat;
|
||||
import static com.google.common.truth.Fact.simpleFact;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.EppResourceUtils.isActive;
|
||||
import static google.registry.testing.DatastoreHelper.getHistoryEntriesOfType;
|
||||
import static google.registry.testing.HistoryEntrySubject.assertAboutHistoryEntries;
|
||||
|
@ -158,7 +157,9 @@ abstract class AbstractEppResourceSubject
|
|||
public And<S> hasExactlyStatusValues(StatusValue... statusValues) {
|
||||
if (!ImmutableSet.copyOf(actual().getStatusValues())
|
||||
.equals(ImmutableSet.copyOf(statusValues))) {
|
||||
assertThat(actual().getStatusValues()).named("status values for " + actualAsString())
|
||||
check("getStatusValues()")
|
||||
.that(actual().getStatusValues())
|
||||
.named("status values for " + actualAsString())
|
||||
.containsExactly((Object[]) statusValues);
|
||||
}
|
||||
return andChainer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue