Skip to content

Commit

Permalink
Split out bike tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Nov 4, 2024
1 parent f01e26a commit dd5c17c
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -175,26 +174,33 @@ public void sharedStop() throws IOException {
}

static List<TripPlanParameters> 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<TripPlanParameters> 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());
}
Expand Down

0 comments on commit dd5c17c

Please sign in to comment.