From e1bdb098de312eaa77958f7996d76fa3dd3b2082 Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Sat, 25 Sep 2021 13:53:58 +0200 Subject: [PATCH] Upgrade AssertJ Core 3.20.2 -> 3.21.0 See: - https://assertj.github.io/doc/#assertj-core-release-notes - https://github.com/joel-costigliola/assertj-core/compare/assertj-core-3.20.2...assertj-core-3.21.0 --- .../refastertemplates/AssertJTemplates.java | 15 ++++++++------- pom.xml | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJTemplates.java index eb8a871c6c..0458fc05ff 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJTemplates.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJTemplates.java @@ -39,6 +39,7 @@ import java.util.stream.Stream; import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.AbstractBooleanAssert; +import org.assertj.core.api.AbstractCollectionAssert; import org.assertj.core.api.AbstractComparableAssert; import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.api.AbstractIntegerAssert; @@ -529,7 +530,7 @@ ListAssert after(List list1, List list2) { static final class AssertThatSetsAreEqual { @BeforeTemplate - IterableAssert before(Set set1, Set set2) { + AbstractCollectionAssert before(Set set1, Set set2) { return Refaster.anyOf( assertThat(set1).isEqualTo(set2), assertThat(set1).containsExactlyInAnyOrderElementsOf(set2)); @@ -537,7 +538,7 @@ IterableAssert before(Set set1, Set set2) { @AfterTemplate @UseImportPolicy(ImportPolicy.STATIC_IMPORT_ALWAYS) - IterableAssert after(Set set1, Set set2) { + AbstractCollectionAssert after(Set set1, Set set2) { return assertThat(set1).hasSameElementsAs(set2); } } @@ -548,13 +549,13 @@ IterableAssert after(Set set1, Set set2) { static final class AssertThatMultisetsAreEqual { @BeforeTemplate - IterableAssert before(Multiset multiset1, Multiset multiset2) { + AbstractCollectionAssert before(Multiset multiset1, Multiset multiset2) { return assertThat(multiset1).isEqualTo(multiset2); } @AfterTemplate @UseImportPolicy(ImportPolicy.STATIC_IMPORT_ALWAYS) - IterableAssert after(Multiset multiset1, Multiset multiset2) { + AbstractCollectionAssert after(Multiset multiset1, Multiset multiset2) { return assertThat(multiset1).containsExactlyInAnyOrderElementsOf(multiset2); } } @@ -934,7 +935,7 @@ ListAssert before( } @BeforeTemplate - IterableAssert before2( + AbstractCollectionAssert before2( Stream stream, Collector> collector, Iterable iterable) { return assertThat(stream.collect(collector)).containsExactlyInAnyOrderElementsOf(iterable); } @@ -955,7 +956,7 @@ ListAssert before( } @BeforeTemplate - IterableAssert before2( + AbstractCollectionAssert before2( Stream stream, Collector> collector, U[] array) { return assertThat(stream.collect(collector)).containsExactlyInAnyOrder(array); } @@ -979,7 +980,7 @@ ListAssert before( @BeforeTemplate @SuppressWarnings("AssertThatStreamContainsExactlyInAnyOrder" /* Varargs converted to array. */) - IterableAssert before2( + AbstractCollectionAssert before2( Stream stream, Collector> collector, @Repeated U elements) { return assertThat(stream.collect(collector)) .containsExactlyInAnyOrder(Refaster.asVarargs(elements)); diff --git a/pom.xml b/pom.xml index 83972559b8..4b75abfddf 100644 --- a/pom.xml +++ b/pom.xml @@ -330,7 +330,7 @@ org.assertj assertj-core - 3.20.2 + 3.21.0 org.checkerframework