diff --git a/src/test/java/spoon/test/pkg/PackageTest.java b/src/test/java/spoon/test/pkg/PackageTest.java index b6ad85b3d71..f04664e39cb 100644 --- a/src/test/java/spoon/test/pkg/PackageTest.java +++ b/src/test/java/spoon/test/pkg/PackageTest.java @@ -16,9 +16,18 @@ */ package spoon.test.pkg; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.Set; -import org.junit.Test; + import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import spoon.Launcher; import spoon.OutputType; import spoon.SpoonModelBuilder; @@ -46,22 +55,15 @@ import spoon.test.pkg.testclasses.Foo; import spoon.testing.utils.ModelUtils; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import static spoon.testing.Assert.assertThat; import static spoon.testing.utils.ModelUtils.canBeBuilt; import static spoon.testing.utils.ModelUtils.createFactory; @@ -326,7 +328,7 @@ public void testNoPackageAssumptionWithStarImportNoClasspath() { CtModel model = launcher.buildModel(); List> typeAccesses = model.getElements(e -> e.getAccessedType().getSimpleName().equals("SomeClass")); - assertEquals("There should only be a single type access in the test source code", 1, typeAccesses.size()); + assertEquals(1, typeAccesses.size(), "There should only be a single type access in the test source code"); CtPackageReference pkgRef = typeAccesses.get(0).getAccessedType().getPackage(); assertTrue(pkgRef.getSimpleName().isEmpty());