diff --git a/src/test/java/org/openrewrite/analysis/dataflow/ExternalFlowModelsTest.java b/src/test/java/org/openrewrite/analysis/dataflow/ExternalFlowModelsTest.java index c4c2f60e1..1cb589db3 100644 --- a/src/test/java/org/openrewrite/analysis/dataflow/ExternalFlowModelsTest.java +++ b/src/test/java/org/openrewrite/analysis/dataflow/ExternalFlowModelsTest.java @@ -21,7 +21,7 @@ import java.util.Set; import java.util.stream.Collectors; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.assertj.core.api.Assertions.assertThat; class ExternalFlowModelsTest { @Test @@ -45,8 +45,8 @@ void listFlowModelsOptimized() { taint = taint.stream().filter(ExternalFlowModelsTest::filterModels).collect(Collectors.toSet()); // Ensure that there are no unchecked values - assertEquals(0, value.size(), "All value models should be optimized"); - assertEquals(0, taint.size(), "All taint models should be optimized"); + assertThat(value.size()).as("All value models should be optimized").isEqualTo(0); + assertThat(taint.size()).as("All taint models should be optimized").isEqualTo(0); } static boolean filterModels(ExternalFlowModels.FlowModel model) { diff --git a/src/test/java/org/openrewrite/analysis/dataflow/ExternalSinkModelsTest.java b/src/test/java/org/openrewrite/analysis/dataflow/ExternalSinkModelsTest.java index aa663e09e..6890dca90 100644 --- a/src/test/java/org/openrewrite/analysis/dataflow/ExternalSinkModelsTest.java +++ b/src/test/java/org/openrewrite/analysis/dataflow/ExternalSinkModelsTest.java @@ -20,7 +20,7 @@ import java.util.HashSet; import java.util.Set; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.assertj.core.api.Assertions.assertThat; class ExternalSinkModelsTest { @@ -37,7 +37,7 @@ void listSinkModelsOptimized() { // Remove all optimized sink flow models models.removeAll(optimizedModels.getSinkModels()); - assertEquals(0, models.size(), "All sink models should be optimized"); + assertThat(models.size()).as("All sink models should be optimized").isEqualTo(0); } } diff --git a/src/test/java/org/openrewrite/analysis/util/CursorUtilTest.java b/src/test/java/org/openrewrite/analysis/util/CursorUtilTest.java index b54ca8f61..15bccabda 100644 --- a/src/test/java/org/openrewrite/analysis/util/CursorUtilTest.java +++ b/src/test/java/org/openrewrite/analysis/util/CursorUtilTest.java @@ -24,7 +24,6 @@ import org.openrewrite.test.RewriteTest; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.openrewrite.java.Assertions.java; class CursorUtilTest implements RewriteTest { @@ -35,7 +34,7 @@ private static final class FindCursorForTreeTestVisitor extends JavaVisitor found = CursorUtil.findCursorForTree(getCursor(), method.getArguments().get(0)); - assertTrue(found.isSome(), "Cursor for the sub-tree tree not found"); + assertThat(found.isSome()).as("Cursor for the sub-tree tree not found").isTrue(); assertThat(found.some().getValue()).isEqualTo(method.getArguments().get(0)); assertThat(found.some().dropParentUntil(J.MethodInvocation.class::isInstance).getValue()).isEqualTo(method); assertThat(found.some().dropParentUntil(J.CompilationUnit.class::isInstance)).isNotNull();