Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsute committed Feb 4, 2022
1 parent af92be8 commit 11838a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.katsute</groupId>
<artifactId>onemta</artifactId>
<version>1.0.0-RC-3-SNAPSHOT</version>
<version>1.0.0-RC-3</version>

<profiles>
<profile>
Expand Down
10 changes: 8 additions & 2 deletions src/test/java/dev/katsute/onemta/bus/TestBusRoute.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ final void testVehicleTripStops(){
boolean tested = false;
for(final Vehicle vehicle : route.getVehicles())
if(vehicle.getTrip() != null && vehicle.getTrip().getTripStops().length > 0){
TripValidation.testTripStops(vehicle.getTrip().getTripStops());
BusExtensions.testTripStops(vehicle.getTrip().getTripStops());
tested = true;
}
final boolean finalTested = tested;
Expand Down Expand Up @@ -156,8 +156,14 @@ final class TripStopTests {

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

}
Expand Down

0 comments on commit 11838a1

Please sign in to comment.