diff --git a/onebusaway-gtfs-hibernate/pom.xml b/onebusaway-gtfs-hibernate/pom.xml
index 04c4a3039..55bcf42e7 100644
--- a/onebusaway-gtfs-hibernate/pom.xml
+++ b/onebusaway-gtfs-hibernate/pom.xml
@@ -41,11 +41,6 @@
junit-jupiter-api
test
-
- org.junit.vintage
- junit-vintage-engine
- test
-
org.slf4j
slf4j-simple
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java
index d7cd1cb65..4ae4443bf 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java
@@ -15,17 +15,17 @@
*/
package org.onebusaway.gtfs.impl;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
import java.io.IOException;
import java.io.StringReader;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
-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;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.AgencyAndId;
@@ -43,7 +43,7 @@ public class GtfsMappingTest {
private static GtfsReader _reader;
- @Before
+ @BeforeEach
public void setup() throws IOException {
Configuration config = new Configuration();
@@ -57,7 +57,7 @@ public void setup() throws IOException {
_reader.setEntityStore(_dao);
}
- @After
+ @AfterEach
public void teardown() {
if (_dao != null)
_dao.close();
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java
index 365f7bbe4..7ef7313fb 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java
@@ -16,11 +16,11 @@
*/
package org.onebusaway.gtfs.impl;
-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.assertTrue;
+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.assertTrue;
import java.io.File;
import java.io.IOException;
@@ -30,9 +30,9 @@
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
-import org.junit.AfterClass;
-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.Test;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Route;
@@ -53,7 +53,7 @@ public class HibernateGtfsRelationalDaoImplCaltrainTest {
private static HibernateGtfsRelationalDaoImpl _dao;
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
Configuration config = new Configuration();
@@ -70,7 +70,7 @@ public static void setup() throws IOException {
reader.run();
}
- @AfterClass
+ @AfterAll
public static void teardown() {
_sessionFactory.close();
}
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplTest.java
index c2fbbd614..9d328797a 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs.impl;
-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.IOException;
import java.util.HashSet;
@@ -25,9 +25,9 @@
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
-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;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Stop;
@@ -37,7 +37,7 @@ public class HibernateGtfsRelationalDaoImplTest {
private static HibernateGtfsRelationalDaoImpl _dao;
- @Before
+ @BeforeEach
public void setup() throws IOException {
Configuration config = new Configuration();
@@ -48,7 +48,7 @@ public void setup() throws IOException {
_dao.open();
}
- @After
+ @AfterEach
public void teardown() {
if (_dao != null)
_dao.close();
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalImplBartTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalImplBartTest.java
index 9ed08d7b9..85879865e 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalImplBartTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalImplBartTest.java
@@ -16,8 +16,8 @@
*/
package org.onebusaway.gtfs.impl;
-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.File;
import java.io.IOException;
@@ -25,9 +25,9 @@
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
-import org.junit.AfterClass;
-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.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Frequency;
import org.onebusaway.gtfs.model.ServiceCalendar;
@@ -44,7 +44,7 @@ public class HibernateGtfsRelationalImplBartTest {
private static HibernateGtfsRelationalDaoImpl _dao;
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
Configuration config = new Configuration();
@@ -61,7 +61,7 @@ public static void setup() throws IOException {
reader.run();
}
- @AfterClass
+ @AfterAll
public static void teardown() {
_sessionFactory.close();
}
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/LongRouteDescriptionTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/LongRouteDescriptionTest.java
index 4b45b0620..8ec801906 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/LongRouteDescriptionTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/LongRouteDescriptionTest.java
@@ -15,7 +15,7 @@
*/
package org.onebusaway.gtfs.impl;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.File;
import java.io.IOException;
@@ -23,9 +23,9 @@
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
-import org.junit.AfterClass;
-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.Test;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Route;
@@ -39,7 +39,7 @@ public class LongRouteDescriptionTest {
private static HibernateGtfsRelationalDaoImpl _dao;
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
Configuration config = new Configuration();
@@ -62,7 +62,7 @@ public static void setup() throws IOException {
reader.run();
}
- @AfterClass
+ @AfterAll
public static void teardown() {
_sessionFactory.close();
}
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/VehicleTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/VehicleTest.java
index 5693a32a9..5730ed4db 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/VehicleTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/VehicleTest.java
@@ -17,9 +17,9 @@
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
-import org.junit.AfterClass;
-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.Test;
import org.onebusaway.gtfs.model.*;
import org.onebusaway.gtfs.serialization.GtfsReader;
@@ -27,7 +27,7 @@
import java.io.IOException;
import java.util.List;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public class VehicleTest {
private static SessionFactory _sessionFactory;
@@ -36,7 +36,7 @@ public class VehicleTest {
private static HibernateGtfsRelationalDaoImpl _dao;
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
Configuration config = new Configuration();
@@ -59,7 +59,7 @@ public static void setup() throws IOException {
reader.run();
}
- @AfterClass
+ @AfterAll
public static void teardown() {
_sessionFactory.close();
}
diff --git a/onebusaway-gtfs-merge/pom.xml b/onebusaway-gtfs-merge/pom.xml
index 80b394a85..6bfe28927 100644
--- a/onebusaway-gtfs-merge/pom.xml
+++ b/onebusaway-gtfs-merge/pom.xml
@@ -32,11 +32,6 @@
junit-jupiter-api
test
-
- org.junit.vintage
- junit-vintage-engine
- test
-
org.mockito
mockito-core
diff --git a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/GtfsMergerTest.java b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/GtfsMergerTest.java
index aafe73725..2344f6e5c 100644
--- a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/GtfsMergerTest.java
+++ b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/GtfsMergerTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs_merge;
-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.File;
import java.io.IOException;
@@ -24,9 +24,9 @@
import java.util.Iterator;
import java.util.List;
-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;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.*;
import org.onebusaway.gtfs.serialization.GtfsReader;
@@ -56,7 +56,7 @@ public class GtfsMergerTest {
private GtfsMerger _merger;
- @Before
+ @BeforeEach
public void before() throws IOException {
_oldGtfs = MockGtfs.create();
_newGtfs = MockGtfs.create();
@@ -65,7 +65,7 @@ public void before() throws IOException {
_merger = new GtfsMerger();
}
- @After
+ @AfterEach
public void after() {
}
@@ -224,7 +224,7 @@ public void testAgencyPreference() throws IOException {
pugetStopFound = true;
}
}
- assertTrue("expect a puget stop", pugetStopFound);
+ assertTrue(pugetStopFound, "expect a puget stop");
}
@Test
@@ -352,7 +352,7 @@ public void testRenameStrategy() throws IOException {
assertTrue("b-sid0".matches("[a-j]-.*"));
- assertTrue("expect a puget stop", pugetStopFound);
+ assertTrue(pugetStopFound, "expect a puget stop");
}
// tests stop, location, and location group
@@ -454,10 +454,11 @@ public void testStopTimeProxies() throws IOException {
boolean hasST = st.getStop()!=null;
boolean hasLoc = st.getLocation()!=null;
boolean hasLocGroup = st.getLocationGroup()!=null;
- assertTrue("multiple ids found for stop: "+st.getStop()+
+ assertTrue( !(hasST & hasLoc | hasST && hasLocGroup | hasLoc & hasLocGroup),
+ "multiple ids found for stop: "+st.getStop()+
", location_id: "+st.getLocation()+
- ", location_id: "+st.getLocationGroup(),
- !(hasST & hasLoc | hasST && hasLocGroup | hasLoc & hasLocGroup));
+ ", location_id: "+st.getLocationGroup()
+ );
}
}
diff --git a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/MergeExpectedFilesTest.java b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/MergeExpectedFilesTest.java
index 02be0698d..9246dda1f 100644
--- a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/MergeExpectedFilesTest.java
+++ b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/MergeExpectedFilesTest.java
@@ -15,9 +15,9 @@
*/
package org.onebusaway.gtfs_merge;
-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;
import org.onebusaway.gtfs.impl.FileSupport;
import org.onebusaway.gtfs.impl.ZipHandler;
@@ -29,7 +29,7 @@
import java.util.List;
import java.util.stream.Collectors;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Test appending metadata inputs as part of merge.
@@ -40,12 +40,12 @@ public class MergeExpectedFilesTest {
private FileSupport _support = new FileSupport();
- @Before
+ @BeforeEach
public void before() throws IOException {
_merger = new GtfsMerger();
}
- @After
+ @AfterEach
public void after() {
_support.cleanup();
}
@@ -68,8 +68,8 @@ public void testDirectoryMerge() throws Exception {
String modLocation = gtfsDirectory.getAbsolutePath() + File.separator + "modifications.txt";
File expectedFile = new File(modLocation);
// verify modifications.txt is there!!!!
- assertTrue("expected modifications.txt to be present!", expectedFile.exists());
- assertTrue("expected modifications.txt to be a file!", expectedFile.isFile());
+ assertTrue(expectedFile.exists(), "expected modifications.txt to be present!");
+ assertTrue(expectedFile.isFile(), "expected modifications.txt to be a file!");
StringBuffer sb = new StringBuffer();
BufferedReader br = new BufferedReader(new FileReader(expectedFile));
sb.append(br.lines().collect(Collectors.joining(System.lineSeparator())));
diff --git a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/AgencyMergeStrategyTest.java b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/AgencyMergeStrategyTest.java
index 621f20889..23e793845 100644
--- a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/AgencyMergeStrategyTest.java
+++ b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/AgencyMergeStrategyTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs_merge.strategies;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
import java.util.Collection;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.AgencyAndId;
@@ -40,7 +40,7 @@ public class AgencyMergeStrategyTest extends EntityMergeTestSupport {
private GtfsRelationalDaoImpl _target;
- @Before
+ @BeforeEach
public void before() {
_strategy = new AgencyMergeStrategy();
_target = new GtfsRelationalDaoImpl();
diff --git a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/EntityMergeTestSupport.java b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/EntityMergeTestSupport.java
index d1572930f..af128f1f6 100644
--- a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/EntityMergeTestSupport.java
+++ b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/EntityMergeTestSupport.java
@@ -18,7 +18,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.junit.Before;
+import org.junit.jupiter.api.BeforeEach;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs_merge.GtfsMergeContext;
@@ -26,7 +26,7 @@ public class EntityMergeTestSupport {
protected Map entityByRawId;
- @Before
+ @BeforeEach
public void setup() {
entityByRawId = new HashMap();
}
diff --git a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/IntegrationTest.java b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/IntegrationTest.java
index fe37d8271..e6655f291 100644
--- a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/IntegrationTest.java
+++ b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/IntegrationTest.java
@@ -17,7 +17,7 @@
import java.io.IOException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.services.MockGtfs;
public class IntegrationTest {
diff --git a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/TripMergeStrategyTest.java b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/TripMergeStrategyTest.java
index 5afe3a801..e1e10013a 100644
--- a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/TripMergeStrategyTest.java
+++ b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/TripMergeStrategyTest.java
@@ -15,24 +15,8 @@
*/
package org.onebusaway.gtfs_merge.strategies;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-
-import java.util.Collection;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
-import org.onebusaway.gtfs.model.Agency;
-import org.onebusaway.gtfs.model.AgencyAndId;
-import org.onebusaway.gtfs.model.FareAttribute;
-import org.onebusaway.gtfs.model.Route;
-import org.onebusaway.gtfs.model.ServiceCalendar;
-import org.onebusaway.gtfs.model.ServiceCalendarDate;
-import org.onebusaway.gtfs.model.ShapePoint;
-import org.onebusaway.gtfs.model.Stop;
-import org.onebusaway.gtfs.model.Trip;
-import org.onebusaway.gtfs_merge.GtfsMergeContext;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
public class TripMergeStrategyTest extends EntityMergeTestSupport {
diff --git a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/scoring/DuplicateScoringSupportTest.java b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/scoring/DuplicateScoringSupportTest.java
index e6e3008e2..63e0cb2b7 100644
--- a/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/scoring/DuplicateScoringSupportTest.java
+++ b/onebusaway-gtfs-merge/src/test/java/org/onebusaway/gtfs_merge/strategies/scoring/DuplicateScoringSupportTest.java
@@ -15,12 +15,12 @@
*/
package org.onebusaway.gtfs_merge.strategies.scoring;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.HashSet;
import java.util.Set;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class DuplicateScoringSupportTest {
diff --git a/onebusaway-gtfs-transformer-cli-aws/pom.xml b/onebusaway-gtfs-transformer-cli-aws/pom.xml
index 124a7a9f5..8975ed344 100644
--- a/onebusaway-gtfs-transformer-cli-aws/pom.xml
+++ b/onebusaway-gtfs-transformer-cli-aws/pom.xml
@@ -40,8 +40,8 @@
${slf4j_version}
- org.junit.vintage
- junit-vintage-engine
+ org.junit.jupiter
+ junit-jupiter-api
test
diff --git a/onebusaway-gtfs-transformer-cli/pom.xml b/onebusaway-gtfs-transformer-cli/pom.xml
index becf8e614..7fa6d376f 100644
--- a/onebusaway-gtfs-transformer-cli/pom.xml
+++ b/onebusaway-gtfs-transformer-cli/pom.xml
@@ -39,11 +39,6 @@
junit-jupiter-api
test
-
- org.junit.vintage
- junit-vintage-engine
- test
-
diff --git a/onebusaway-gtfs-transformer/pom.xml b/onebusaway-gtfs-transformer/pom.xml
index 41411f0f1..44356ec57 100644
--- a/onebusaway-gtfs-transformer/pom.xml
+++ b/onebusaway-gtfs-transformer/pom.xml
@@ -21,6 +21,12 @@
org.onebusaway
onebusaway-collections
+
+
+ junit
+ junit
+
+
org.json
@@ -31,11 +37,6 @@
org.junit.jupiter
junit-jupiter-api
test
-
-
- org.junit.vintage
- junit-vintage-engine
- test
org.slf4j
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AbstractTestSupport.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AbstractTestSupport.java
index d42fa54b7..d67fe9020 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AbstractTestSupport.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AbstractTestSupport.java
@@ -18,8 +18,8 @@
import java.io.File;
import java.io.IOException;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.serialization.GtfsReader;
import org.onebusaway.gtfs.services.GtfsRelationalDao;
@@ -34,7 +34,7 @@ public class AbstractTestSupport {
private File _outputPath;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
_outputPath = File.createTempFile("MockGtfs-", ".zip");
@@ -45,7 +45,7 @@ public void before() throws IOException {
_transformer.setOutputDirectory(_outputPath);
}
- @After
+ @AfterEach
public void after() {
_gtfs.getPath().delete();
_outputPath.delete();
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AddEntityTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AddEntityTest.java
index 2f0d603d0..fd67b3c7b 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AddEntityTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/AddEntityTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs_transformer;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
import java.io.IOException;
import java.util.Collection;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Frequency;
import org.onebusaway.gtfs.serialization.mappings.StopTimeFieldMappingFactory;
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/GtfsTransformerTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/GtfsTransformerTest.java
index ea79c68dc..3971675b0 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/GtfsTransformerTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/GtfsTransformerTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs_transformer;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.io.IOException;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.StopTime;
import org.onebusaway.gtfs.services.GtfsRelationalDao;
@@ -35,7 +35,7 @@ public class GtfsTransformerTest {
private GtfsTransformer _transformer = new GtfsTransformer();
- @Before
+ @BeforeEach
public void setup() throws IOException {
_gtfs = MockGtfs.create();
_gtfs.putAgencies(1);
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueConverterTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueConverterTest.java
index b84ade38d..f7a150a50 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueConverterTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueConverterTest.java
@@ -15,10 +15,10 @@
*/
package org.onebusaway.gtfs_transformer.deferred;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.schema.BeanWrapperFactory;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.Agency;
@@ -43,7 +43,7 @@ public class DeferredValueConverterTest {
private DeferredValueConverter _converter;
- @Before
+ @BeforeEach
public void setup() {
_schemaCache.addEntitySchemasFromGtfsReader(_reader);
_reader.setDefaultAgencyId("1");
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueMatcherTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueMatcherTest.java
index 499fdc498..006f40bb0 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueMatcherTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueMatcherTest.java
@@ -15,11 +15,11 @@
*/
package org.onebusaway.gtfs_transformer.deferred;
-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 org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Route;
import org.onebusaway.gtfs.model.ServiceCalendar;
@@ -35,7 +35,7 @@ public class DeferredValueMatcherTest {
private EntitySchemaCache _schemaCache = new EntitySchemaCache();
- @Before
+ @BeforeEach
public void setup() {
_reader.setDefaultAgencyId("1");
_schemaCache.addEntitySchemasFromGtfsReader(_reader);
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSetterTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSetterTest.java
index 5f83adbce..b0715b78c 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSetterTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSetterTest.java
@@ -15,10 +15,10 @@
*/
package org.onebusaway.gtfs_transformer.deferred;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.schema.BeanWrapperFactory;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.Stop;
@@ -33,7 +33,7 @@ public class DeferredValueSetterTest {
private EntitySchemaCache _schemaCache = new EntitySchemaCache();
- @Before
+ @BeforeEach
public void setup() {
_schemaCache.addEntitySchemasFromGtfsReader(_reader);
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSupportTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSupportTest.java
index 4c81da8bc..b1fcd860d 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSupportTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/DeferredValueSupportTest.java
@@ -15,15 +15,15 @@
*/
package org.onebusaway.gtfs_transformer.deferred;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.Converter;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.schema.BeanWrapper;
import org.onebusaway.csv_entities.schema.BeanWrapperFactory;
import org.onebusaway.csv_entities.schema.EntitySchema;
@@ -41,7 +41,7 @@ public class DeferredValueSupportTest {
private EntitySchemaCache _schemaCache;
private DeferredValueSupport _support;
- @Before
+ @BeforeEach
public void before() {
_reader = new GtfsReader();
_reader.setDefaultAgencyId("a0");
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/EntitySchemaCacheTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/EntitySchemaCacheTest.java
index 23d159fc8..36ba44d8e 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/EntitySchemaCacheTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/EntitySchemaCacheTest.java
@@ -15,9 +15,9 @@
*/
package org.onebusaway.gtfs_transformer.deferred;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.schema.DefaultFieldMapping;
import org.onebusaway.csv_entities.schema.EntitySchema;
import org.onebusaway.csv_entities.schema.FieldMapping;
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/PropertyPathExpressionValueSetterTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/PropertyPathExpressionValueSetterTest.java
index dd59f0006..9e6a497b6 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/PropertyPathExpressionValueSetterTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/PropertyPathExpressionValueSetterTest.java
@@ -15,10 +15,10 @@
*/
package org.onebusaway.gtfs_transformer.deferred;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.collections.beans.PropertyPathExpression;
import org.onebusaway.csv_entities.schema.BeanWrapperFactory;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
@@ -36,7 +36,7 @@ public class PropertyPathExpressionValueSetterTest {
private EntitySchemaCache _schemaCache = new EntitySchemaCache();
private GtfsMutableRelationalDao _dao = new GtfsRelationalDaoImpl();
- @Before
+ @BeforeEach
public void setup() {
_schemaCache.addEntitySchemasFromGtfsReader(_reader);
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/ReplaceValueSetterTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/ReplaceValueSetterTest.java
index cb6c34ef5..abb963321 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/ReplaceValueSetterTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/deferred/ReplaceValueSetterTest.java
@@ -15,9 +15,9 @@
*/
package org.onebusaway.gtfs_transformer.deferred;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.schema.BeanWrapperFactory;
import org.onebusaway.gtfs.model.Stop;
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/PropertyMethodResolverImplTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/PropertyMethodResolverImplTest.java
index 139543138..1d3035f06 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/PropertyMethodResolverImplTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/PropertyMethodResolverImplTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs_transformer.factory;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.collections.beans.PropertyMethod;
import org.onebusaway.csv_entities.schema.DefaultEntitySchemaFactory;
import org.onebusaway.csv_entities.schema.EntitySchema;
@@ -46,7 +46,7 @@ public class PropertyMethodResolverImplTest {
private PropertyMethodResolverImpl _resolver;
- @Before
+ @BeforeEach
public void before() {
_dao = new GtfsRelationalDaoImpl();
_schemaCache = new EntitySchemaCache();
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/TransformFactoryTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/TransformFactoryTest.java
index 0c8147f61..977000045 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/TransformFactoryTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/factory/TransformFactoryTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs_transformer.factory;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Route;
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/impl/AddExtensionFileTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/impl/AddExtensionFileTest.java
index c4e816503..600ee88ae 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/impl/AddExtensionFileTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/impl/AddExtensionFileTest.java
@@ -15,13 +15,12 @@
*/
package org.onebusaway.gtfs_transformer.impl;
-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;
import org.onebusaway.gtfs.impl.FileSupport;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.serialization.GtfsWriter;
-import org.onebusaway.gtfs.services.GtfsRelationalDao;
import org.onebusaway.gtfs_transformer.AbstractTestSupport;
import org.onebusaway.gtfs_transformer.services.TransformContext;
@@ -32,7 +31,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
/**
* test we can insert an extension into a GTFS file via a transformation.
@@ -46,7 +45,7 @@ public class AddExtensionFileTest extends AbstractTestSupport {
private TransformContext context = new TransformContext();
private GtfsWriter writer = new GtfsWriter();
- @Before
+ @BeforeEach
public void setup() {
_gtfs.putAgencies(1);
_gtfs.putStops(1);
@@ -55,7 +54,7 @@ public void setup() {
_gtfs.putStopTimes("t0", "s0");
}
- @After
+ @AfterEach
public void teardown() {
_support.cleanup();
}
@@ -89,8 +88,8 @@ public void run() throws IOException {
String modLocation = tmpFileDirectory.getAbsolutePath() + File.separator + extensionName;
File expectedFile = new File(modLocation);
// verify file is there
- assertTrue("expected extension to be present!", expectedFile.exists());
- assertTrue("expected extension to be a file!", expectedFile.isFile());
+ assertTrue(expectedFile.exists(), "expected extension to be present!");
+ assertTrue(expectedFile.isFile(), "expected extension to be a file!");
String actualText = Files.readString(Path.of(modLocation));
assertEquals(TXT_STRING, actualText);
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarExtensionStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarExtensionStrategyTest.java
index b771193dc..ab9de5526 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarExtensionStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarExtensionStrategyTest.java
@@ -15,15 +15,15 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import java.util.Set;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.impl.calendar.CalendarServiceDataFactoryImpl;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ServiceCalendar;
@@ -41,7 +41,7 @@ public class CalendarExtensionStrategyTest {
private TransformContext _context = new TransformContext();
- @Before
+ @BeforeEach
public void setup() throws IOException {
_gtfs = MockGtfs.create();
_gtfs.putAgencies(1);
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationLibraryTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationLibraryTest.java
index 237562a3b..4a012007c 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationLibraryTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationLibraryTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.impl.calendar.CalendarServiceDataFactoryImpl;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ServiceCalendar;
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationStrategyTest.java
index 652b75526..8c79cf5cc 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CalendarSimplicationStrategyTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-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.List;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ServiceCalendar;
import org.onebusaway.gtfs.model.ServiceCalendarDate;
@@ -31,7 +31,7 @@
public class CalendarSimplicationStrategyTest extends AbstractTestSupport {
- @Before
+ @BeforeEach
public void setup() {
_transformer.addTransform(new CalendarSimplicationStrategy());
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CarryForwardExpectedFilesTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CarryForwardExpectedFilesTest.java
index 8fcef1bcd..94be17e4b 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CarryForwardExpectedFilesTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/CarryForwardExpectedFilesTest.java
@@ -15,9 +15,9 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-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;
import org.onebusaway.gtfs.impl.FileSupport;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.impl.ZipHandler;
@@ -28,7 +28,7 @@
import java.io.IOException;
import java.net.URISyntaxException;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Ensure metadata files are still present in typical read/write cycle.
@@ -42,12 +42,12 @@ public class CarryForwardExpectedFilesTest {
private FileSupport _support = new FileSupport();
- @Before
+ @BeforeEach
public void setup() throws IOException, URISyntaxException {
_dao = new GtfsRelationalDaoImpl();
}
- @After
+ @AfterEach
public void teardown() {
_support.cleanup();
}
@@ -75,8 +75,8 @@ public void testFile() throws Exception {
String modLocation = _tmpFileDirectory.getAbsolutePath() + File.separator + "modifications.txt";
File expectedFile = new File(modLocation);
// verify modifications.txt is there!!!!
- assertTrue("expected modifications.txt to be present!", expectedFile.exists());
- assertTrue("expected modifications.txt to be a file!", expectedFile.isFile());
+ assertTrue(expectedFile.exists(), "expected modifications.txt to be present!");
+ assertTrue(expectedFile.isFile(), "expected modifications.txt to be a file!");
}
@Test
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/DeduplicateServiceIdsStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/DeduplicateServiceIdsStrategyTest.java
index 2e70aecda..822cbf469 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/DeduplicateServiceIdsStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/DeduplicateServiceIdsStrategyTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.io.IOException;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.services.GtfsMutableRelationalDao;
@@ -37,7 +37,7 @@ public class DeduplicateServiceIdsStrategyTest {
private TransformContext _context = new TransformContext();
- @Before
+ @BeforeEach
public void setup() throws IOException {
_gtfs = MockGtfs.create();
_gtfs.putAgencies(1);
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/EntityRetentionGraphTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/EntityRetentionGraphTest.java
index c877c8a89..9475b32b8 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/EntityRetentionGraphTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/EntityRetentionGraphTest.java
@@ -15,24 +15,22 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.AgencyAndId;
-import org.onebusaway.gtfs.model.FareRule;
import org.onebusaway.gtfs.model.ShapePoint;
import org.onebusaway.gtfs.model.Stop;
import org.onebusaway.gtfs.serialization.GtfsReader;
-import org.onebusaway.gtfs.services.GtfsMutableRelationalDao;
import org.onebusaway.gtfs.services.GtfsRelationalDao;
import org.onebusaway.gtfs.services.MockGtfs;
import org.onebusaway.gtfs_transformer.factory.EntityRetentionGraph;
@@ -43,7 +41,7 @@ public class EntityRetentionGraphTest {
private EntityRetentionGraph _graph;
- @Before
+ @BeforeEach
public void setup() throws IOException, URISyntaxException {
GtfsRelationalDaoImpl dao = new GtfsRelationalDaoImpl();
_dao = dao;
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/InterpolateStopTimesFromTimePointsStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/InterpolateStopTimesFromTimePointsStrategyTest.java
index 7c923eef2..d041c82da 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/InterpolateStopTimesFromTimePointsStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/InterpolateStopTimesFromTimePointsStrategyTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.StopTime;
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.services.GtfsMutableRelationalDao;
@@ -30,7 +30,7 @@
import java.util.Date;
import java.util.List;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
/**
* Sanity check the interpolation strategy.
@@ -44,7 +44,7 @@ public class InterpolateStopTimesFromTimePointsStrategyTest {
private TransformContext _context = new TransformContext();
- @Before
+ @BeforeEach
public void setup() throws IOException {
_gtfs = MockGtfs.create();
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/LastStopToHeadsignStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/LastStopToHeadsignStrategyTest.java
index cc255b71f..45eb4c038 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/LastStopToHeadsignStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/LastStopToHeadsignStrategyTest.java
@@ -16,9 +16,12 @@
package org.onebusaway.gtfs_transformer.updates;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Trip;
@@ -32,7 +35,7 @@
public class LastStopToHeadsignStrategyTest {
private GtfsRelationalDaoImpl _dao;
- @Before
+ @BeforeEach
public void setup() throws IOException, URISyntaxException {
_dao = new GtfsRelationalDaoImpl();
@@ -53,10 +56,10 @@ public void test() {
tripId.setAgencyId("agency");
Trip trip = _dao.getTripForId(tripId);
- Assert.assertNotSame("C",trip.getTripHeadsign());
+ assertNotSame("C",trip.getTripHeadsign());
_strategy.run(new TransformContext(), _dao);
trip = _dao.getTripForId(tripId);
- Assert.assertEquals("C",trip.getTripHeadsign());
+ assertEquals("C",trip.getTripHeadsign());
}
}
\ No newline at end of file
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/MTAStationAccessibilityStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/MTAStationAccessibilityStrategyTest.java
index 176e8eceb..46a436484 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/MTAStationAccessibilityStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/MTAStationAccessibilityStrategyTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Stop;
import org.onebusaway.gtfs.services.GtfsRelationalDao;
@@ -24,8 +24,8 @@
import java.io.File;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.onebusaway.gtfs_transformer.csv.MTAStation.*;
/**
@@ -33,7 +33,7 @@
*/
public class MTAStationAccessibilityStrategyTest extends AbstractTestSupport {
- @Before
+ @BeforeEach
public void setup() throws Exception {
File stations_csv = new File(getClass().getResource(
"/org/onebusaway/gtfs_transformer/stations/stations.csv").toURI());
@@ -66,17 +66,16 @@ private void assertStation(GtfsRelationalDao dao, String stopId, int ada, Intege
Stop sStop = dao.getStopForId(new AgencyAndId("a0", stopId+"S"));
assertNotNull(sStop);
- assertEquals("expecting ada flag to match wheelchairBoarding flag for stop " + parentStop.getId(),
- ada, converGTFSccessibilityToMTA(parentStop.getWheelchairBoarding()));
+ assertEquals(converGTFSccessibilityToMTA(parentStop.getWheelchairBoarding()), ada, "expecting ada flag to match wheelchairBoarding flag for stop " + parentStop.getId());
if (northBoundFlag == null) {
- assertEquals("expecting N/A wheelchairBoarding for northbound stop " + nStop,0, converGTFSccessibilityToMTA(nStop.getWheelchairBoarding())); // default is 0
+ assertEquals(0, converGTFSccessibilityToMTA(nStop.getWheelchairBoarding()), "expecting N/A wheelchairBoarding for northbound stop " + nStop); // default is 0
} else {
- assertEquals("expecting northBoundFlag to match wheelchairBoarding flag for stop" + nStop, northBoundFlag.intValue(), converGTFSccessibilityToMTA(nStop.getWheelchairBoarding()));
+ assertEquals(northBoundFlag.intValue(), converGTFSccessibilityToMTA(nStop.getWheelchairBoarding()), "expecting northBoundFlag to match wheelchairBoarding flag for stop" + nStop);
}
if (southBoundFlag == null) {
- assertEquals("expecting N/A wheelchairBoarding for southbound stop " + sStop,0, converGTFSccessibilityToMTA(sStop.getWheelchairBoarding()));
+ assertEquals(0, converGTFSccessibilityToMTA(sStop.getWheelchairBoarding()), "expecting N/A wheelchairBoarding for southbound stop " + sStop);
} else {
- assertEquals("expecting southBoundFlag to match wheelchairBoarding flag for stop" + sStop, southBoundFlag.intValue(), converGTFSccessibilityToMTA(sStop.getWheelchairBoarding()));
+ assertEquals(southBoundFlag.intValue(), converGTFSccessibilityToMTA(sStop.getWheelchairBoarding()), "expecting southBoundFlag to match wheelchairBoarding flag for stop" + sStop);
}
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveNonRevenueStopsStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveNonRevenueStopsStrategyTest.java
index 7c1f8252b..1ea211742 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveNonRevenueStopsStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveNonRevenueStopsStrategyTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
import java.io.IOException;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.StopTime;
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.services.GtfsMutableRelationalDao;
@@ -33,7 +33,7 @@ public class RemoveNonRevenueStopsStrategyTest {
private MockGtfs _gtfs;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveRepeatedStopTimesStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveRepeatedStopTimesStrategyTest.java
index c7cf84b9f..de6e363c3 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveRepeatedStopTimesStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/RemoveRepeatedStopTimesStrategyTest.java
@@ -15,11 +15,10 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.collections.tuple.T2;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
-import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.StopTime;
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.serialization.GtfsReader;
@@ -32,8 +31,8 @@
import java.util.List;
import java.util.Map;
-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 static org.onebusaway.gtfs_transformer.updates.TripsByBlockInSortedOrder.getTripsByBlockAndServiceIdInSortedOrder;
/**
@@ -43,7 +42,7 @@ public class RemoveRepeatedStopTimesStrategyTest {
private GtfsRelationalDaoImpl _dao;
private TransformContext _context = new TransformContext();
- @Before
+ @BeforeEach
public void before() throws IOException {
_dao = new GtfsRelationalDaoImpl();
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShapeDirectionTransformStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShapeDirectionTransformStrategyTest.java
index 4bda9284f..86b31085b 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShapeDirectionTransformStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShapeDirectionTransformStrategyTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ShapePoint;
@@ -25,8 +25,8 @@
import org.onebusaway.gtfs.services.MockGtfs;
import org.onebusaway.gtfs_transformer.services.TransformContext;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.Collection;
@@ -41,7 +41,7 @@ public class ShapeDirectionTransformStrategyTest {
private MockGtfs _gtfs;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShiftNegativeStopTimesUpdateStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShiftNegativeStopTimesUpdateStrategyTest.java
index cd659acba..33e81b945 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShiftNegativeStopTimesUpdateStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/ShiftNegativeStopTimesUpdateStrategyTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.ServiceCalendar;
import org.onebusaway.gtfs.model.StopTime;
import org.onebusaway.gtfs.model.Trip;
@@ -37,7 +37,7 @@ public class ShiftNegativeStopTimesUpdateStrategyTest {
private MockGtfs _gtfs;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/TrimTripTransformStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/TrimTripTransformStrategyTest.java
index 161eef65f..7c090237c 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/TrimTripTransformStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/TrimTripTransformStrategyTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.collections.beans.PropertyPathExpression;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ShapePoint;
@@ -45,7 +45,7 @@ public class TrimTripTransformStrategyTest {
private TransformContext _context = new TransformContext();
- @Before
+ @BeforeEach
public void setup() throws IOException {
_gtfs = MockGtfs.create();
}
diff --git a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/UpdateStopNameFromParentStationIfInvalidStrategyTest.java b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/UpdateStopNameFromParentStationIfInvalidStrategyTest.java
index 6641e0f57..ae485faeb 100644
--- a/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/UpdateStopNameFromParentStationIfInvalidStrategyTest.java
+++ b/onebusaway-gtfs-transformer/src/test/java/org/onebusaway/gtfs_transformer/updates/UpdateStopNameFromParentStationIfInvalidStrategyTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs_transformer.updates;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.services.GtfsMutableRelationalDao;
import org.onebusaway.gtfs.services.MockGtfs;
@@ -25,18 +25,19 @@
import java.io.IOException;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
public class UpdateStopNameFromParentStationIfInvalidStrategyTest {
private MockGtfs _gtfs;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
}
- @Test public void test() throws IOException {
+ @Test
+ public void test() throws IOException {
_gtfs.putAgencies(1);
_gtfs.putLines("stops.txt",
"stop_id,stop_name,stop_lat,stop_lon,location_type,parent_station,platform_code",
diff --git a/onebusaway-gtfs/pom.xml b/onebusaway-gtfs/pom.xml
index e17e61042..c3c06fe85 100644
--- a/onebusaway-gtfs/pom.xml
+++ b/onebusaway-gtfs/pom.xml
@@ -1,4 +1,5 @@
-
+
4.0.0
onebusaway-gtfs
jar
@@ -44,8 +45,8 @@
${slf4j_version}
- org.junit.vintage
- junit-vintage-engine
+ org.junit.jupiter
+ junit-jupiter-api
test
@@ -57,6 +58,7 @@
+
com.mycila
license-maven-plugin
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/ExtensionsTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/ExtensionsTest.java
index 48f876420..a0d99da82 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/ExtensionsTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/ExtensionsTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.File;
import java.io.IOException;
-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;
import org.onebusaway.csv_entities.schema.DefaultEntitySchemaFactory;
import org.onebusaway.csv_entities.schema.annotations.CsvField;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
@@ -39,7 +39,7 @@ public class ExtensionsTest {
private File _tmpDirectory;
- @Before
+ @BeforeEach
public void setup() throws IOException {
_tmpDirectory = File.createTempFile("GtfsWriterTest-", "-tmp");
if (_tmpDirectory.exists())
@@ -47,7 +47,7 @@ public void setup() throws IOException {
_tmpDirectory.mkdirs();
}
- @After
+ @AfterEach
public void teardown() {
GtfsWriterTest.deleteFileRecursively(_tmpDirectory);
}
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GenericDaoImplTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GenericDaoImplTest.java
index 9f3b88060..8a9b345cc 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GenericDaoImplTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GenericDaoImplTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs.impl;
-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 java.util.Collection;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.Stop;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsDaoImplTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsDaoImplTest.java
index 8ffe17973..3176c83c5 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsDaoImplTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsDaoImplTest.java
@@ -15,7 +15,7 @@
*/
package org.onebusaway.gtfs.impl;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.model.Agency;
@@ -33,7 +33,7 @@
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.model.calendar.ServiceDate;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.Collection;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsRelationalDaoImplTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsRelationalDaoImplTest.java
index c74c5dd78..1e0c9a850 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsRelationalDaoImplTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/GtfsRelationalDaoImplTest.java
@@ -16,13 +16,13 @@
*/
package org.onebusaway.gtfs.impl;
-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.IOException;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.AgencyAndId;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplSyntheticTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplSyntheticTest.java
index d1c76b62a..b9f2dc2dc 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplSyntheticTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplSyntheticTest.java
@@ -17,10 +17,10 @@
*/
package org.onebusaway.gtfs.impl.calendar;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-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.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import java.io.IOException;
import java.util.Arrays;
@@ -29,7 +29,7 @@
import java.util.Set;
import java.util.TimeZone;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.DateSupport;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.Agency;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplTest.java
index d75a08a66..83a61ac6d 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceDataFactoryImplTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs.impl.calendar;
-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.IOException;
import java.util.Date;
@@ -24,7 +24,7 @@
import java.util.Set;
import java.util.TimeZone;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.DateSupport;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplSyntheticTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplSyntheticTest.java
index cb8294a16..2547ef0a5 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplSyntheticTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplSyntheticTest.java
@@ -15,17 +15,17 @@
*/
package org.onebusaway.gtfs.impl.calendar;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.onebusaway.gtfs.DateSupport.date;
import static org.onebusaway.gtfs.DateSupport.hourToSec;
import java.util.*;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.calendar.*;
@@ -53,7 +53,7 @@ public class CalendarServiceImplSyntheticTest {
private CalendarServiceImpl service;
- @Before
+ @BeforeEach
public void setup() {
CalendarServiceData data = new CalendarServiceData();
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplTest.java
index 581310463..f21ade2a6 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/calendar/CalendarServiceImplTest.java
@@ -15,8 +15,8 @@
*/
package org.onebusaway.gtfs.impl.calendar;
-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.IOException;
import java.util.Calendar;
@@ -24,7 +24,7 @@
import java.util.HashSet;
import java.util.Set;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.AgencyAndId;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/fares/FareAtrributeAgencyTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/fares/FareAtrributeAgencyTest.java
index 543ed8498..1512983e8 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/fares/FareAtrributeAgencyTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/fares/FareAtrributeAgencyTest.java
@@ -15,7 +15,7 @@
*/
package org.onebusaway.gtfs.impl.fares;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.FareAttribute;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/translation/TranslationServiceImplTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/translation/TranslationServiceImplTest.java
index 98d571571..0529b4bcf 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/translation/TranslationServiceImplTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/impl/translation/TranslationServiceImplTest.java
@@ -15,7 +15,7 @@
*/
package org.onebusaway.gtfs.impl.translation;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.Agency;
@@ -29,7 +29,7 @@
import java.io.IOException;
import java.util.List;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public class TranslationServiceImplTest {
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/AgencyAndIdTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/AgencyAndIdTest.java
index 19d4440e8..6e1ae60b5 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/AgencyAndIdTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/AgencyAndIdTest.java
@@ -15,10 +15,10 @@
*/
package org.onebusaway.gtfs.model;
-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 AgencyAndIdTest {
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/MissingValueTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/MissingValueTest.java
index bbe6f6613..c36111091 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/MissingValueTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/MissingValueTest.java
@@ -19,15 +19,15 @@
import java.io.IOException;
import java.util.Scanner;
-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;
import org.onebusaway.gtfs.serialization.GtfsWriter;
import org.onebusaway.gtfs.serialization.GtfsWriterTest;
import org.onebusaway.gtfs.services.MockGtfs;
import org.onebusaway.gtfs.services.GtfsRelationalDao;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
/**
* Optional flex fields in stop times should not be present
@@ -40,7 +40,7 @@ public class MissingValueTest {
private File _tmpDirectory;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
@@ -88,9 +88,9 @@ public void test() throws IOException {
foundShapeDist = true;
}
}
- assertFalse("Empty Column not properly removed in line " + headerLine, foundEmptyColumn);
- assertTrue("Column unexpectedly removed in line " + headerLine, foundProperArrivalTime);
- assertFalse("Not expecting shapeDistTraveled in line " + headerLine, foundShapeDist);
+ assertFalse(foundEmptyColumn, "Empty Column not properly removed in line " + headerLine);
+ assertTrue(foundProperArrivalTime, "Column unexpectedly removed in line " + headerLine);
+ assertFalse(foundShapeDist, "Not expecting shapeDistTraveled in line " + headerLine);
}
@Test
@@ -117,7 +117,7 @@ public void testStartingWithMissingValue() throws IOException {
foundTimepoint = true;
}
}
- assertFalse("Empty Column not properly removed", foundTimepoint);
+ assertFalse(foundTimepoint, "Empty Column not properly removed" );
}
/**
@@ -182,14 +182,14 @@ public void testStartingWithMissingDoubleValue() throws IOException {
}
}
- assertFalse("Empty Column not properly removed", foundTimepoint);
- assertFalse("Not expecting shapeDistTraveled in line " + headerLine, foundShapeDist);
- assertFalse("Not expecting start service area radius in line " + headerLine, foundStartServiceArea);
- assertFalse("Not expecting end service area radius in line " + headerLine, foundEndServiceArea);
- assertFalse("Not expecting mean duration factor in line " + headerLine, foundMeanDurationFactor);
- assertFalse("Not expecting mean duration offset in line " + headerLine, foundMeanDurationOffset);
- assertFalse("Not expecting safe duration factor in line " + headerLine, foundSafeDurationFactor);
- assertFalse("Not expecting safe duration offset in line " + headerLine, foundSafeDurationOffset);
+ assertFalse(foundTimepoint, "Empty Column not properly removed");
+ assertFalse(foundShapeDist, "Not expecting shapeDistTraveled in line " + headerLine);
+ assertFalse(foundStartServiceArea, "Not expecting start service area radius in line " + headerLine );
+ assertFalse(foundEndServiceArea, "Not expecting end service area radius in line " + headerLine );
+ assertFalse(foundMeanDurationFactor, "Not expecting mean duration factor in line " + headerLine );
+ assertFalse(foundMeanDurationOffset, "Not expecting mean duration offset in line " + headerLine );
+ assertFalse(foundSafeDurationFactor, "Not expecting safe duration factor in line " + headerLine );
+ assertFalse(foundSafeDurationOffset, "Not expecting safe duration offset in line " + headerLine);
}
@Test
@@ -199,7 +199,7 @@ public void testPutMinimal() throws IOException {
_gtfs.read();
}
- @After
+ @AfterEach
public void teardown() {
deleteFileRecursively(_tmpDirectory);
}
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/StopTimeWithUnderscoreTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/StopTimeWithUnderscoreTest.java
index 9a5240a7e..bdb0112c6 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/StopTimeWithUnderscoreTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/StopTimeWithUnderscoreTest.java
@@ -19,15 +19,15 @@
import java.io.IOException;
import java.util.*;
-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;
import org.onebusaway.gtfs.serialization.GtfsWriter;
import org.onebusaway.gtfs.serialization.GtfsWriterTest;
import org.onebusaway.gtfs.services.MockGtfs;
import org.onebusaway.gtfs.services.GtfsRelationalDao;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
public class StopTimeWithUnderscoreTest {
@@ -35,7 +35,7 @@ public class StopTimeWithUnderscoreTest {
private File _tmpDirectory;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
@@ -71,7 +71,7 @@ public void testWithUnderScore() throws IOException {
}
}
// if the underscore version was input use it as output
- assertTrue("Column without underscore was not found", foundUnderscoreParam);
+ assertTrue(foundUnderscoreParam, "Column without underscore was not found");
}
@Test
@@ -99,7 +99,7 @@ public void testWithoutUnderscore() throws IOException {
}
}
// if the new spec was used as input ensure it is output
- assertTrue("Column without underscore was not found", foundUnderscoreParam);
+ assertTrue(foundUnderscoreParam, "Column without underscore was not found");
}
@Test
@@ -109,7 +109,7 @@ public void testPutMinimal() throws IOException {
_gtfs.read();
}
- @After
+ @AfterEach
public void teardown() {
deleteFileRecursively(_tmpDirectory);
}
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/LocalizedServiceIdTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/LocalizedServiceIdTest.java
index d77e7f5a6..ee21d9937 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/LocalizedServiceIdTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/LocalizedServiceIdTest.java
@@ -15,12 +15,12 @@
*/
package org.onebusaway.gtfs.model.calendar;
-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.util.TimeZone;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
public class LocalizedServiceIdTest {
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceDateTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceDateTest.java
index b7ddd6afd..403db6ad5 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceDateTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceDateTest.java
@@ -16,9 +16,9 @@
*/
package org.onebusaway.gtfs.model.calendar;
-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 static org.onebusaway.gtfs.DateSupport.date;
import java.text.ParseException;
@@ -26,8 +26,7 @@
import java.util.Date;
import java.util.TimeZone;
-import org.junit.Test;
-import org.onebusaway.gtfs.model.calendar.ServiceDate;
+import org.junit.jupiter.api.Test;
public class ServiceDateTest {
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceIdIntervalsTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceIdIntervalsTest.java
index 9c85644b8..87cffbcdf 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceIdIntervalsTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/model/calendar/ServiceIdIntervalsTest.java
@@ -15,11 +15,11 @@
*/
package org.onebusaway.gtfs.model.calendar;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.TimeZone;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
public class ServiceIdIntervalsTest {
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FaresV2ReaderTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FaresV2ReaderTest.java
index dfaf49d7b..0745742de 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FaresV2ReaderTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FaresV2ReaderTest.java
@@ -15,20 +15,15 @@
*/
package org.onebusaway.gtfs.serialization;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-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.assertTrue;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.model.Agency;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexDropOffSpellingTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexDropOffSpellingTest.java
index d5bb63ad7..6acba3215 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexDropOffSpellingTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexDropOffSpellingTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs.serialization;
-import static junit.framework.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.onebusaway.gtfs.serialization.GtfsReaderTest.processFeed;
import java.io.IOException;
import java.time.LocalTime;
import java.util.ArrayList;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.StopTime;
import org.onebusaway.gtfs.services.GtfsRelationalDao;
import org.onebusaway.gtfs.services.MockGtfs;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexReaderTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexReaderTest.java
index 880377d60..0a523aa43 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexReaderTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/FlexReaderTest.java
@@ -15,16 +15,16 @@
*/
package org.onebusaway.gtfs.serialization;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
import java.io.IOException;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.model.Location;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderDefaultAgencyIdTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderDefaultAgencyIdTest.java
index c9176bb32..4aca79d38 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderDefaultAgencyIdTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderDefaultAgencyIdTest.java
@@ -18,7 +18,7 @@
import java.io.IOException;
import java.io.StringReader;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.Route;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderStopsTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderStopsTest.java
index 348adfd57..88b95ed99 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderStopsTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderStopsTest.java
@@ -16,15 +16,15 @@
*/
package org.onebusaway.gtfs.serialization;
-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.io.IOException;
import java.util.Arrays;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.csv_entities.exceptions.MissingRequiredFieldException;
import org.onebusaway.gtfs.model.Agency;
@@ -35,7 +35,7 @@ public class GtfsReaderStopsTest {
private MockGtfs _gtfs;
- @Before
+ @BeforeEach
public void setup() throws IOException {
_gtfs = MockGtfs.create();
_gtfs.putDefaultAgencies();
@@ -50,7 +50,7 @@ public void setup() throws IOException {
*/
@Test
- @Ignore
+ @Disabled
public void testMissingStopLat() throws IOException {
_gtfs.putLines("stops.txt", "stop_id,stop_name,stop_lat,stop_lon",
"1,The Stop, ,-122.0");
@@ -64,7 +64,7 @@ public void testMissingStopLat() throws IOException {
}
@Test
- @Ignore
+ @Disabled
public void testMissingStopLon() throws IOException {
_gtfs.putLines("stops.txt", "stop_id,stop_name,stop_lat,stop_lon",
"1,The Stop,47.0,");
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java
index dc6b7724f..7579f3074 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java
@@ -16,32 +16,29 @@
*/
package org.onebusaway.gtfs.serialization;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-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.assertNotSame;
+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 java.io.File;
import java.io.IOException;
import java.io.StringReader;
-import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.csv_entities.exceptions.InvalidValueEntityException;
import org.onebusaway.csv_entities.exceptions.MissingRequiredFieldException;
import org.onebusaway.gtfs.GtfsTestData;
-import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.*;
import org.onebusaway.gtfs.model.calendar.ServiceDate;
import org.onebusaway.gtfs.serialization.mappings.AgencyNotFoundForRouteException;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsWriterTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsWriterTest.java
index b8c47d6b5..24fe90c38 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsWriterTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsWriterTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs.serialization;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.File;
import java.io.IOException;
-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;
import org.onebusaway.gtfs.impl.FileSupport;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.Agency;
@@ -32,7 +32,7 @@ public class GtfsWriterTest {
private FileSupport _support = new FileSupport();
private File _tmpDirectory;
- @Before
+ @BeforeEach
public void setup() throws IOException {
_tmpDirectory = File.createTempFile("GtfsWriterTest-", "-tmp");
if (_tmpDirectory.exists())
@@ -41,7 +41,7 @@ public void setup() throws IOException {
_support.markForDeletion(_tmpDirectory);
}
- @After
+ @AfterEach
public void teardown() {
_support.cleanup();
}
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/LocationsGeoJSONReaderTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/LocationsGeoJSONReaderTest.java
index cab0e3f93..f2fbc858d 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/LocationsGeoJSONReaderTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/LocationsGeoJSONReaderTest.java
@@ -17,7 +17,7 @@
package org.onebusaway.gtfs.serialization;
import org.geojson.LngLatAlt;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.model.Location;
import org.geojson.Polygon;
@@ -27,8 +27,8 @@
import java.io.InputStreamReader;
import java.util.Collection;
-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;
public class LocationsGeoJSONReaderTest {
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/VehiclesExtReaderTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/VehiclesExtReaderTest.java
index 97534e277..b5ce4fe90 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/VehiclesExtReaderTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/VehiclesExtReaderTest.java
@@ -15,7 +15,7 @@
*/
package org.onebusaway.gtfs.serialization;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.GtfsTestData;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.AgencyAndId;
@@ -25,8 +25,8 @@
import java.io.IOException;
import java.util.Collection;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
public class VehiclesExtReaderTest extends BaseGtfsTest{
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/LatLonFieldMappingFactoryTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/LatLonFieldMappingFactoryTest.java
index 4ead77180..a15c72815 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/LatLonFieldMappingFactoryTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/LatLonFieldMappingFactoryTest.java
@@ -15,14 +15,14 @@
*/
package org.onebusaway.gtfs.serialization.mappings;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.CsvEntityContextImpl;
import org.onebusaway.csv_entities.schema.BeanWrapperFactory;
import org.onebusaway.csv_entities.schema.DefaultEntitySchemaFactory;
@@ -34,7 +34,7 @@ public class LatLonFieldMappingFactoryTest {
private FieldMapping _fieldMapping;
- @Before
+ @BeforeEach
public void before() {
_fieldMapping = buildFieldMapping();
}
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/ServiceDateFieldMappingFactoryTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/ServiceDateFieldMappingFactoryTest.java
index 479408c30..b66a06a65 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/ServiceDateFieldMappingFactoryTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/ServiceDateFieldMappingFactoryTest.java
@@ -15,12 +15,12 @@
*/
package org.onebusaway.gtfs.serialization.mappings;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.HashMap;
import java.util.Map;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.CsvEntityContext;
import org.onebusaway.csv_entities.CsvEntityContextImpl;
import org.onebusaway.csv_entities.schema.BeanWrapper;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/StopTimeFieldMappingFactoryTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/StopTimeFieldMappingFactoryTest.java
index a839d1264..e68d4d881 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/StopTimeFieldMappingFactoryTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/mappings/StopTimeFieldMappingFactoryTest.java
@@ -16,15 +16,15 @@
*/
package org.onebusaway.gtfs.serialization.mappings;
-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 static org.onebusaway.gtfs.serialization.mappings.StopTimeFieldMappingFactory.getStringAsSeconds;
import static org.onebusaway.gtfs.serialization.mappings.StopTimeFieldMappingFactory.getSecondsAsString;
import java.util.HashMap;
import java.util.Map;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onebusaway.csv_entities.CsvEntityContext;
import org.onebusaway.csv_entities.CsvEntityContextImpl;
import org.onebusaway.csv_entities.schema.BeanWrapper;
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/services/MockGtfsTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/services/MockGtfsTest.java
index 2099ac324..4477b883e 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/services/MockGtfsTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/services/MockGtfsTest.java
@@ -15,13 +15,13 @@
*/
package org.onebusaway.gtfs.services;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ServiceCalendarDate;
import org.onebusaway.gtfs.model.calendar.ServiceDate;
@@ -30,7 +30,7 @@ public class MockGtfsTest {
private MockGtfs _gtfs;
- @Before
+ @BeforeEach
public void before() throws IOException {
_gtfs = MockGtfs.create();
}
diff --git a/pom.xml b/pom.xml
index fa1e18c9c..86dd9f153 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,6 +95,12 @@
org.onebusaway
onebusaway-collections
${onebusaway_collections_version}
+
+
+ junit
+ junit
+
+
org.slf4j
@@ -117,12 +123,6 @@
5.6.2
test
-
- org.junit.vintage
- junit-vintage-engine
- 5.6.2
- test
-
org.mockito
mockito-core
@@ -201,6 +201,18 @@
maven-jar-plugin
3.0.1
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.3.1
+
+
+ me.fabriciorby
+ maven-surefire-junit5-tree-reporter
+ 1.3.0
+
+
+
com.mycila
license-maven-plugin