From dd5c17c4715e65ef998315c2a1b3977cdd57858b Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 4 Nov 2024 18:25:10 +0100 Subject: [PATCH] Split out bike tests --- .../smoketest/SeattleSmokeTest.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/smoketest/SeattleSmokeTest.java b/application/src/test/java/org/opentripplanner/smoketest/SeattleSmokeTest.java index f98bf8f3e0b..5a66bab3904 100644 --- a/application/src/test/java/org/opentripplanner/smoketest/SeattleSmokeTest.java +++ b/application/src/test/java/org/opentripplanner/smoketest/SeattleSmokeTest.java @@ -28,7 +28,6 @@ import org.opentripplanner.client.model.TripPlan; import org.opentripplanner.client.parameters.TripPlanParameters; import org.opentripplanner.client.parameters.TripPlanParametersBuilder; -import org.opentripplanner.framework.collection.ListUtils; import org.opentripplanner.smoketest.util.RequestCombinationsBuilder; import org.opentripplanner.smoketest.util.SmokeTestRequest; @@ -175,26 +174,33 @@ public void sharedStop() throws IOException { } static List buildCombinations() { - var walk = new RequestCombinationsBuilder() + return new RequestCombinationsBuilder() .withLocations(SODO, ESPERANCE, CLYDE_HILL, RONALD_BOG_PARK, OLIVE_WAY, MOUNTAINLAKE_TERRACE) .withModes(TRANSIT, WALK) .withTime(SmokeTest.weekdayAtNoon()) .includeWheelchair() .includeArriveBy() .build(); - var bike = new RequestCombinationsBuilder() + } + + @ParameterizedTest + @MethodSource("buildCombinations") + public void accessibleRouting(TripPlanParameters params) throws IOException { + var tripPlan = SmokeTest.API_CLIENT.plan(params); + assertFalse(tripPlan.transitItineraries().isEmpty()); + } + + static List bikeCombinations() { + return new RequestCombinationsBuilder() .withLocations(SODO, ESPERANCE, OLIVE_WAY, MOUNTAINLAKE_TERRACE) .withModes(TRANSIT, BICYCLE) .withTime(SmokeTest.weekdayAtNoon()) .includeArriveBy() .build(); - - return ListUtils.combine(walk, bike); } - @ParameterizedTest - @MethodSource("buildCombinations") - public void accessibleRouting(TripPlanParameters params) throws IOException { + @MethodSource("bikeCombinations") + public void bikeAndTransit(TripPlanParameters params) throws IOException { var tripPlan = SmokeTest.API_CLIENT.plan(params); assertFalse(tripPlan.transitItineraries().isEmpty()); }