From 251ec1ed328047217793f6d816ff95e4efe83c74 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Fri, 3 May 2019 13:40:15 -0700 Subject: [PATCH] Migrate from containsAllIn to containsAtLeastElementsIn The two behave identically, and containsAllIn is being removed. More information: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246565417 --- javatests/google/registry/export/ExportConstantsTest.java | 2 +- javatests/google/registry/model/EntityClassesTest.java | 4 +++- .../registry/tools/server/KillAllEppResourcesActionTest.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/javatests/google/registry/export/ExportConstantsTest.java b/javatests/google/registry/export/ExportConstantsTest.java index 9cdf33ffd..42d5972cc 100644 --- a/javatests/google/registry/export/ExportConstantsTest.java +++ b/javatests/google/registry/export/ExportConstantsTest.java @@ -64,7 +64,7 @@ public class ExportConstantsTest { @Test public void testReportingKinds_areSubsetOfBackupKinds() { - assertThat(getBackupKinds()).containsAllIn(getReportingKinds()); + assertThat(getBackupKinds()).containsAtLeastElementsIn(getReportingKinds()); } private static void checkKindsMatchGoldenFile( diff --git a/javatests/google/registry/model/EntityClassesTest.java b/javatests/google/registry/model/EntityClassesTest.java index d678a38dc..5966a9c7b 100644 --- a/javatests/google/registry/model/EntityClassesTest.java +++ b/javatests/google/registry/model/EntityClassesTest.java @@ -67,7 +67,9 @@ public class EntityClassesTest { .filter(hasAnnotation(EntitySubclass.class)) .map(Key::getKind) .collect(toImmutableSet()); - assertWithMessage("base entity kinds").that(baseEntityKinds).containsAllIn(entitySubclassKinds); + assertWithMessage("base entity kinds") + .that(baseEntityKinds) + .containsAtLeastElementsIn(entitySubclassKinds); } @Test diff --git a/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java b/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java index 10f5052d0..7418a1a29 100644 --- a/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java +++ b/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java @@ -130,7 +130,7 @@ public class KillAllEppResourcesActionTest extends MapreduceTestCase beforeContents = getDatastoreContents(); - assertThat(beforeContents.keySet()).containsAllIn(AFFECTED_KINDS); + assertThat(beforeContents.keySet()).containsAtLeastElementsIn(AFFECTED_KINDS); assertThat(difference(beforeContents.keySet(), AFFECTED_KINDS)).isNotEmpty(); runMapreduce(); ofy().clearSessionCache();