From de5f3e61776e0dcf538409e03fd94b1ad61e3f47 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Mon, 29 Apr 2019 08:26:29 -0700 Subject: [PATCH] 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 --- .../google/registry/testing/AbstractEppResourceSubject.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/javatests/google/registry/testing/AbstractEppResourceSubject.java b/javatests/google/registry/testing/AbstractEppResourceSubject.java index 4d57b4ea0..4e3fc8adb 100644 --- a/javatests/google/registry/testing/AbstractEppResourceSubject.java +++ b/javatests/google/registry/testing/AbstractEppResourceSubject.java @@ -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 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();