diff --git a/essential/iwant-api-antrunner/src/test/java/org/fluentjava/iwant/api/antrunner/MinimalAntLoggerTest.java b/essential/iwant-api-antrunner/src/test/java/org/fluentjava/iwant/api/antrunner/MinimalAntLoggerTest.java index 23069a95..ed860db0 100644 --- a/essential/iwant-api-antrunner/src/test/java/org/fluentjava/iwant/api/antrunner/MinimalAntLoggerTest.java +++ b/essential/iwant-api-antrunner/src/test/java/org/fluentjava/iwant/api/antrunner/MinimalAntLoggerTest.java @@ -1,16 +1,16 @@ package org.fluentjava.iwant.api.antrunner; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.Project; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class MinimalAntLoggerTest { @@ -19,7 +19,7 @@ public class MinimalAntLoggerTest { private PrintStream err; private Project project; - @Before + @BeforeEach public void before() { logger = new MinimalAntLogger(); errBytes = new ByteArrayOutputStream(); @@ -28,7 +28,7 @@ public void before() { project = new Project(); } - @After + @AfterEach public void after() { err.close(); } diff --git a/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/BashScriptTest.java b/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/BashScriptTest.java index abfe99df..86fa0b90 100644 --- a/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/BashScriptTest.java +++ b/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/BashScriptTest.java @@ -6,7 +6,7 @@ import java.util.Arrays; import org.fluentjava.iwant.api.core.ScriptGenerated; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class BashScriptTest { diff --git a/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IndentedStringArrayParserTest.java b/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IndentedStringArrayParserTest.java index 045f4a0b..46935736 100644 --- a/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IndentedStringArrayParserTest.java +++ b/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IndentedStringArrayParserTest.java @@ -1,11 +1,11 @@ package org.fluentjava.iwant.api.bash; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Arrays; import java.util.List; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class IndentedStringArrayParserTest { diff --git a/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IngredientTypeNameValueTest.java b/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IngredientTypeNameValueTest.java index 3f88e236..faf986af 100644 --- a/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IngredientTypeNameValueTest.java +++ b/essential/iwant-api-bash/src/test/java/org/fluentjava/iwant/api/bash/IngredientTypeNameValueTest.java @@ -1,11 +1,11 @@ package org.fluentjava.iwant.api.bash; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Arrays; import java.util.List; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class IngredientTypeNameValueTest { diff --git a/essential/iwant-api-core/src/test/java/org/fluentjava/iwant/api/core/IngredientsAndParametersTest.java b/essential/iwant-api-core/src/test/java/org/fluentjava/iwant/api/core/IngredientsAndParametersTest.java index 639c6331..22f07398 100644 --- a/essential/iwant-api-core/src/test/java/org/fluentjava/iwant/api/core/IngredientsAndParametersTest.java +++ b/essential/iwant-api-core/src/test/java/org/fluentjava/iwant/api/core/IngredientsAndParametersTest.java @@ -1,6 +1,6 @@ package org.fluentjava.iwant.api.core; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.List; @@ -10,8 +10,8 @@ import org.fluentjava.iwant.api.model.TargetEvaluationContext; import org.fluentjava.iwant.api.target.TargetBase; import org.fluentjava.iwant.apimocks.TargetMock; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class IngredientsAndParametersTest { @@ -20,7 +20,7 @@ public class IngredientsAndParametersTest { private Path i3s; private Path i4t; - @Before + @BeforeEach public void before() { i1s = Source.underWsroot("i1"); i2t = new TargetMock("i2"); diff --git a/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/JavaComplianceTest.java b/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/JavaComplianceTest.java index b3204c66..ddf54a4c 100644 --- a/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/JavaComplianceTest.java +++ b/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/JavaComplianceTest.java @@ -1,8 +1,8 @@ package org.fluentjava.iwant.api.javamodules; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class JavaComplianceTest { diff --git a/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/KotlinVersionTest.java b/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/KotlinVersionTest.java index a0df3b3f..a3cc1756 100644 --- a/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/KotlinVersionTest.java +++ b/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/KotlinVersionTest.java @@ -1,11 +1,11 @@ package org.fluentjava.iwant.api.javamodules; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.fluentjava.iwant.api.core.SubPath; import org.fluentjava.iwant.api.zip.Unzipped; import org.fluentjava.iwant.core.download.Downloaded; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class KotlinVersionTest { diff --git a/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/ScalaVersionTest.java b/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/ScalaVersionTest.java index da964926..b3bcc2c3 100644 --- a/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/ScalaVersionTest.java +++ b/essential/iwant-api-javamodules/src/test/java/org/fluentjava/iwant/api/javamodules/ScalaVersionTest.java @@ -1,9 +1,9 @@ package org.fluentjava.iwant.api.javamodules; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.fluentjava.iwant.core.download.Downloaded; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class ScalaVersionTest { diff --git a/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/ExternalSourceTest.java b/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/ExternalSourceTest.java index f7fd875d..73db132a 100644 --- a/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/ExternalSourceTest.java +++ b/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/ExternalSourceTest.java @@ -1,14 +1,14 @@ package org.fluentjava.iwant.api.model; -import static org.junit.Assert.assertEquals; -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.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import java.io.File; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class ExternalSourceTest { diff --git a/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/SystemEnvTest.java b/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/SystemEnvTest.java index bdbfd9c5..d7dd37f1 100644 --- a/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/SystemEnvTest.java +++ b/essential/iwant-api-model/src/test/java/org/fluentjava/iwant/api/model/SystemEnvTest.java @@ -1,11 +1,11 @@ package org.fluentjava.iwant.api.model; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; import org.fluentjava.iwant.api.model.SystemEnv.SystemEnvPlease; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class SystemEnvTest { diff --git a/essential/iwant-api-target/src/test/java/org/fluentjava/iwant/api/target/TargetBaseTest.java b/essential/iwant-api-target/src/test/java/org/fluentjava/iwant/api/target/TargetBaseTest.java index a8d8c47a..e2b5523f 100644 --- a/essential/iwant-api-target/src/test/java/org/fluentjava/iwant/api/target/TargetBaseTest.java +++ b/essential/iwant-api-target/src/test/java/org/fluentjava/iwant/api/target/TargetBaseTest.java @@ -1,12 +1,12 @@ package org.fluentjava.iwant.api.target; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.fluentjava.iwant.api.model.Source; import org.fluentjava.iwant.api.model.SystemEnv; import org.fluentjava.iwant.api.model.Target; import org.fluentjava.iwant.api.model.TargetEvaluationContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TargetBaseTest { diff --git a/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/PathToClasspathLocationOfTest.java b/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/PathToClasspathLocationOfTest.java index 361bfc5a..2844b4de 100644 --- a/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/PathToClasspathLocationOfTest.java +++ b/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/PathToClasspathLocationOfTest.java @@ -1,7 +1,7 @@ package org.fluentjava.iwant.core.javafinder; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.File; @@ -9,7 +9,7 @@ import org.fluentjava.iwant.api.model.ExternalSource; import org.fluentjava.iwant.api.model.Path; import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class PathToClasspathLocationOfTest { diff --git a/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/WsdefJavaOfTest.java b/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/WsdefJavaOfTest.java index a3286fd2..b1e54626 100644 --- a/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/WsdefJavaOfTest.java +++ b/essential/iwant-core-javafinder/src/test/java/org/fluentjava/iwant/core/javafinder/WsdefJavaOfTest.java @@ -1,7 +1,7 @@ package org.fluentjava.iwant.core.javafinder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; import java.util.Set; @@ -12,14 +12,14 @@ import org.fluentjava.iwant.api.wsdef.IwantPluginWishes; import org.fluentjava.iwant.api.wsdef.WishDefinitionContext; import org.fluentjava.iwant.entry.Iwant.IwantException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class WsdefJavaOfTest { private Ctx ctx; - @Before + @BeforeEach public void before() { ctx = new Ctx(); } diff --git a/essential/iwant-core-javamodules/src/test/java/org/fluentjava/iwant/core/javamodules/JavaModulesTest.java b/essential/iwant-core-javamodules/src/test/java/org/fluentjava/iwant/core/javamodules/JavaModulesTest.java index 3a99adf1..72275a90 100644 --- a/essential/iwant-core-javamodules/src/test/java/org/fluentjava/iwant/core/javamodules/JavaModulesTest.java +++ b/essential/iwant-core-javamodules/src/test/java/org/fluentjava/iwant/core/javamodules/JavaModulesTest.java @@ -1,7 +1,7 @@ package org.fluentjava.iwant.core.javamodules; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import java.util.Iterator; import java.util.List; @@ -16,7 +16,7 @@ import org.fluentjava.iwant.api.zip.Jar; import org.fluentjava.iwant.core.download.Downloaded; import org.fluentjava.iwant.core.download.GnvArtifact; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class JavaModulesTest { diff --git a/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerMicrobenchmarkTest.java b/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerMicrobenchmarkTest.java index 8aec6275..35681f09 100644 --- a/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerMicrobenchmarkTest.java +++ b/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerMicrobenchmarkTest.java @@ -8,7 +8,7 @@ import org.fluentjava.iwant.api.core.Concatenated; import org.fluentjava.iwant.api.core.Concatenated.ConcatenatedBuilder; import org.fluentjava.iwant.api.model.Target; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TargetNameCheckerMicrobenchmarkTest { diff --git a/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerTest.java b/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerTest.java index e3ae9e4d..b3b5f1d0 100644 --- a/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerTest.java +++ b/essential/iwant-entry3/src/test/java/org/fluentjava/iwant/entry3/TargetNameCheckerTest.java @@ -1,7 +1,7 @@ package org.fluentjava.iwant.entry3; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; import java.util.Arrays; @@ -10,7 +10,7 @@ import org.fluentjava.iwant.api.model.Path; import org.fluentjava.iwant.api.model.Source; import org.fluentjava.iwant.api.model.Target; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TargetNameCheckerTest { diff --git a/optional/iwant-plugin-testng/src/test/java/org/fluentjava/iwant/plugin/testng/TestngRunnerTest.java b/optional/iwant-plugin-testng/src/test/java/org/fluentjava/iwant/plugin/testng/TestngRunnerTest.java index 0e1a1958..afad35cb 100644 --- a/optional/iwant-plugin-testng/src/test/java/org/fluentjava/iwant/plugin/testng/TestngRunnerTest.java +++ b/optional/iwant-plugin-testng/src/test/java/org/fluentjava/iwant/plugin/testng/TestngRunnerTest.java @@ -1,32 +1,32 @@ package org.fluentjava.iwant.plugin.testng; -import static org.junit.Assert.assertEquals; -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.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import org.fluentjava.iwant.entry.Iwant; import org.fluentjava.iwant.entry.Iwant.ExitCalledException; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class TestngRunnerTest { private static SecurityManager originalSecurityManager; - @BeforeClass + @BeforeAll public static void beforeClass() { originalSecurityManager = System.getSecurityManager(); System.setSecurityManager(new Iwant.ExitCatcher()); } - @AfterClass + @AfterAll public static void afterClass() { System.setSecurityManager(originalSecurityManager); } - @Before + @BeforeEach public void before() { Successful1.test1Executed = false; Successful1.test2Executed = false; diff --git a/private/iwant-docs/backlog.txt b/private/iwant-docs/backlog.txt index 201ca002..9168fddf 100644 --- a/private/iwant-docs/backlog.txt +++ b/private/iwant-docs/backlog.txt @@ -7,6 +7,8 @@ - simplify iwant for iwant (our iwant.sh): simply use a magic string for tmp, remove by it from cache - optional old runner when defining javamodules: fluent methods for these - convert all tests to junit 5 + + 4 + - 3 - document: in own modules class it's wise to funnel throug a myModule method - deprecate and even remove commonSettins - ha, maybe even force by defining abstract myModule method diff --git a/private/iwant-entry-tests/src/test/java/org/fluentjava/iwant/entry/tests/HttpDownloadTest.java b/private/iwant-entry-tests/src/test/java/org/fluentjava/iwant/entry/tests/HttpDownloadTest.java index 9fb7e293..eae37f01 100644 --- a/private/iwant-entry-tests/src/test/java/org/fluentjava/iwant/entry/tests/HttpDownloadTest.java +++ b/private/iwant-entry-tests/src/test/java/org/fluentjava/iwant/entry/tests/HttpDownloadTest.java @@ -1,8 +1,8 @@ package org.fluentjava.iwant.entry.tests; -import static org.junit.Assert.assertEquals; -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.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import java.io.File; import java.io.IOException; @@ -31,10 +31,10 @@ import org.apache.commons.io.FileUtils; import org.fluentjava.iwant.entry.Iwant; import org.fluentjava.iwant.testarea.TestArea; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import io.vertx.core.Vertx; import io.vertx.core.http.HttpServer; @@ -53,12 +53,12 @@ public class HttpDownloadTest { private SSLSocketFactory defaultSocketFactory; private TrustManager[] defaultTrustManagers; - @BeforeClass + @BeforeAll public static void beforeClass() { vertx = Vertx.vertx(); } - @Before + @BeforeEach public void before() throws InterruptedException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException, UnrecoverableKeyException { @@ -67,7 +67,7 @@ public void before() throws InterruptedException, URISyntaxException, disableCertificateChecks(); } - @After + @AfterEach public void after() throws InterruptedException, KeyManagementException, NoSuchAlgorithmException { enableDefaultCertificateChecks(); diff --git a/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/IwantNetworkMockTest.java b/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/IwantNetworkMockTest.java index 7a99d426..25a84bfc 100644 --- a/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/IwantNetworkMockTest.java +++ b/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/IwantNetworkMockTest.java @@ -1,19 +1,19 @@ package org.fluentjava.iwant.entrymocks; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; import org.fluentjava.iwant.entry.Iwant; import org.fluentjava.iwant.entry.Iwant.UnmodifiableUrl; import org.fluentjava.iwant.testarea.TestArea; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class IwantNetworkMockTest { private IwantNetworkMock network; - @Before + @BeforeEach public void before() { TestArea testArea = TestArea.forTest(this); network = new IwantNetworkMock(testArea); diff --git a/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/NullCheckTest.java b/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/NullCheckTest.java index 17ed335a..6c7774d4 100644 --- a/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/NullCheckTest.java +++ b/private/iwant-entrymocks/src/test/java/org/fluentjava/iwant/entrymocks/NullCheckTest.java @@ -1,9 +1,9 @@ package org.fluentjava.iwant.entrymocks; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class NullCheckTest { diff --git a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/ImpossibleEnumSwitchCasesTest.java b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/ImpossibleEnumSwitchCasesTest.java index dcaa701b..145a427d 100644 --- a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/ImpossibleEnumSwitchCasesTest.java +++ b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/ImpossibleEnumSwitchCasesTest.java @@ -1,7 +1,7 @@ package org.fluentjava.iwant.tests; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; import org.fluentjava.iwant.api.javamodules.CodeFormatterPolicy; import org.fluentjava.iwant.api.javamodules.CodeStyle; @@ -9,7 +9,7 @@ import org.fluentjava.iwant.api.javamodules.CodeStyleValue; import org.fluentjava.iwant.api.javamodules.JavaCompliance; import org.fluentjava.iwant.eclipsesettings.OrgEclipseJdtCorePrefs; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class ImpossibleEnumSwitchCasesTest { diff --git a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/PlannerMicrobenchmarkTest.java b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/PlannerMicrobenchmarkTest.java index ced7c3d4..a5cb500d 100644 --- a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/PlannerMicrobenchmarkTest.java +++ b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/PlannerMicrobenchmarkTest.java @@ -1,6 +1,6 @@ package org.fluentjava.iwant.tests; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.File; import java.util.ArrayList; @@ -20,8 +20,8 @@ import org.fluentjava.iwant.planner.Planner; import org.fluentjava.iwant.plannerapi.Task; import org.fluentjava.iwant.testarea.TestArea; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class PlannerMicrobenchmarkTest { @@ -36,7 +36,7 @@ public class PlannerMicrobenchmarkTest { private int targetCount; private AtomicInteger targetRefreshCount; - @Before + @BeforeEach public void setUp() { testArea = TestArea.forTest(this); wsRoot = testArea.newDir("wsroot"); diff --git a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/SyntheticCodeTest.java b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/SyntheticCodeTest.java index e70a6320..0057c65d 100644 --- a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/SyntheticCodeTest.java +++ b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/SyntheticCodeTest.java @@ -11,7 +11,7 @@ import org.fluentjava.iwant.plannerapi.TaskDirtiness; import org.fluentjava.iwant.plugin.findbugs.FindbugsOutputFormat; import org.fluentjava.iwant.plugin.github.FromGithub; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class SyntheticCodeTest { diff --git a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueMicrobencmarkTest.java b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueMicrobencmarkTest.java index 34e86de3..87f8e62b 100644 --- a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueMicrobencmarkTest.java +++ b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueMicrobencmarkTest.java @@ -1,6 +1,6 @@ package org.fluentjava.iwant.tests; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.ArrayList; import java.util.Collection; @@ -17,7 +17,7 @@ import org.fluentjava.iwant.plannerapi.ResourcePool; import org.fluentjava.iwant.plannerapi.Task; import org.fluentjava.iwant.plannerapi.TaskDirtiness; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TaskQueueMicrobencmarkTest { diff --git a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueWithJavaModulesMicrobencmarkTest.java b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueWithJavaModulesMicrobencmarkTest.java index fb4096cf..4a7e3f37 100644 --- a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueWithJavaModulesMicrobencmarkTest.java +++ b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/TaskQueueWithJavaModulesMicrobencmarkTest.java @@ -1,6 +1,6 @@ package org.fluentjava.iwant.tests; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.File; import java.util.ArrayList; @@ -26,8 +26,8 @@ import org.fluentjava.iwant.planner.TaskQueue; import org.fluentjava.iwant.plannerapi.Task; import org.fluentjava.iwant.testarea.TestArea; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class TaskQueueWithJavaModulesMicrobencmarkTest { @@ -35,7 +35,7 @@ public class TaskQueueWithJavaModulesMicrobencmarkTest { private CachesMock caches; private TargetEvaluationContext ctx; - @Before + @BeforeEach public void before() { testArea = TestArea.forTest(this); caches = new CachesMock(testArea.root()); diff --git a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/targetimplementedinbash/TargetImplementedInBashIntegrationTest.java b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/targetimplementedinbash/TargetImplementedInBashIntegrationTest.java index 8ca537b9..0dd26360 100644 --- a/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/targetimplementedinbash/TargetImplementedInBashIntegrationTest.java +++ b/private/iwant-tests/src/test/java/org/fluentjava/iwant/tests/targetimplementedinbash/TargetImplementedInBashIntegrationTest.java @@ -1,6 +1,6 @@ package org.fluentjava.iwant.tests.targetimplementedinbash; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.ByteArrayOutputStream; import java.io.File; @@ -23,10 +23,10 @@ import org.fluentjava.iwant.entrymocks.IwantNetworkMock; import org.fluentjava.iwant.iwantwsrootfinder.IwantWsRootFinder; import org.fluentjava.iwant.testarea.TestArea; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class TargetImplementedInBashIntegrationTest { @@ -44,13 +44,13 @@ public class TargetImplementedInBashIntegrationTest { private ByteArrayOutputStream err; private String originalLineSeparator; - @BeforeClass + @BeforeAll public static void beforeClass() { File iwantWs = IwantWsRootFinder.essential().getParentFile(); srcDir = new File(iwantWs, "private/iwant-tests/src/test/java"); } - @Before + @BeforeEach public void before() throws Exception { testArea = TestArea.forTest(this); wsRoot = new File(testArea.root(), "wsroot"); @@ -134,7 +134,7 @@ private String err() { return err.toString(); } - @After + @AfterEach public void after() { System.setIn(originalIn); System.setOut(originalOut);