diff --git a/pom.xml b/pom.xml
index 8f3408d5..9c1b78d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
- 16.0-2023w50
+ 16.0-2023w51
@@ -155,11 +155,18 @@
- junit
- junit
- 4.13.2
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.10.1
test
+
+ org.junit.jupiter
+ junit-jupiter
+ 5.10.1
+ test
+
+
diff --git a/src/test/java/org/matsim/codeexamples/RunAbcSimpleExampleTest.java b/src/test/java/org/matsim/codeexamples/RunAbcSimpleExampleTest.java
index c0ae5074..59bee9da 100644
--- a/src/test/java/org/matsim/codeexamples/RunAbcSimpleExampleTest.java
+++ b/src/test/java/org/matsim/codeexamples/RunAbcSimpleExampleTest.java
@@ -3,10 +3,9 @@
import com.jogamp.common.util.SyncedRingbuffer;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.population.Person;
import org.matsim.api.core.v01.population.Population;
@@ -17,15 +16,15 @@
import org.matsim.examples.ExamplesUtils;
import org.matsim.testcases.MatsimTestUtils;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
public class RunAbcSimpleExampleTest{
private static final Logger log = LogManager.getLogger(RunAbcSimpleExampleTest.class) ;
- @Rule public MatsimTestUtils utils = new MatsimTestUtils() ;
+ @RegisterExtension public MatsimTestUtils utils = new MatsimTestUtils() ;
@Test
- public void testMain(){
+ void testMain(){
try{
RunAbcSimpleExample.main( new String []{ IOUtils.extendUrl( ExamplesUtils.getTestScenarioURL( "equil" ), "config.xml" ).toString()
, "--config:controler.outputDirectory=" + utils.getOutputDirectory()
@@ -45,7 +44,7 @@ public void testMain(){
for( Person expectedPerson : expected.getPersons().values() ){
Person actualPerson = actual.getPersons().get( Id.createPersonId( expectedPerson.getId() ) );
- Assert.assertEquals( expectedPerson.getSelectedPlan().getScore(), actualPerson.getSelectedPlan().getScore() );
+ Assertions.assertEquals( expectedPerson.getSelectedPlan().getScore(), actualPerson.getSelectedPlan().getScore() );
}
}
diff --git a/src/test/java/org/matsim/codeexamples/config/ExamplesByConfigfileTest.java b/src/test/java/org/matsim/codeexamples/config/ExamplesByConfigfileTest.java
index 3588b193..1c926f47 100644
--- a/src/test/java/org/matsim/codeexamples/config/ExamplesByConfigfileTest.java
+++ b/src/test/java/org/matsim/codeexamples/config/ExamplesByConfigfileTest.java
@@ -23,13 +23,13 @@
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.stream.Stream;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
import org.matsim.core.config.Config;
import org.matsim.core.controler.OutputDirectoryHierarchy;
import org.matsim.core.utils.io.IOUtils;
@@ -39,44 +39,25 @@
* @author nagel
*
*/
-@RunWith(Parameterized.class)
public class ExamplesByConfigfileTest {
- @Rule public MatsimTestUtils utils = new MatsimTestUtils() ;
+ @RegisterExtension public MatsimTestUtils utils = new MatsimTestUtils() ;
- private String configFile;
-
- public ExamplesByConfigfileTest(String configFile ) {
- this.configFile = configFile ;
- }
-
- @Parameters(name = "{index}: configFilename == {0};")
- public static Collection