Skip to content

Commit 11838a1

Browse files
committed
fix tests
1 parent af92be8 commit 11838a1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>dev.katsute</groupId>
88
<artifactId>onemta</artifactId>
9-
<version>1.0.0-RC-3-SNAPSHOT</version>
9+
<version>1.0.0-RC-3</version>
1010

1111
<profiles>
1212
<profile>

src/test/java/dev/katsute/onemta/bus/TestBusRoute.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ final void testVehicleTripStops(){
9090
boolean tested = false;
9191
for(final Vehicle vehicle : route.getVehicles())
9292
if(vehicle.getTrip() != null && vehicle.getTrip().getTripStops().length > 0){
93-
TripValidation.testTripStops(vehicle.getTrip().getTripStops());
93+
BusExtensions.testTripStops(vehicle.getTrip().getTripStops());
9494
tested = true;
9595
}
9696
final boolean finalTested = tested;
@@ -156,8 +156,14 @@ final class TripStopTests {
156156

157157
@Test
158158
final void testVehicleTripStops(){
159+
boolean tested = false;
159160
for(final Vehicle vehicle : route.getVehicles())
160-
TripValidation.testTripStops(vehicle.getTrip().getTripStops());
161+
if(vehicle.getTrip() != null && vehicle.getTrip().getTripStops().length > 0){
162+
TripValidation.testTripStops(vehicle.getTrip().getTripStops());
163+
tested = true;
164+
}
165+
final boolean finalTested = tested;
166+
annotateTest(() -> assertTrue(finalTested, "Failed to pass trip stop tests, there probably wasn't enough vehicles to conclude test (tested " + route.getVehicles().length + " vehicles)"));
161167
}
162168

163169
}

0 commit comments

Comments
 (0)