diff --git a/src/main/java/org/opentripplanner/model/plan/Itinerary.java b/src/main/java/org/opentripplanner/model/plan/Itinerary.java index 5d133179ece..aa602bf5d89 100644 --- a/src/main/java/org/opentripplanner/model/plan/Itinerary.java +++ b/src/main/java/org/opentripplanner/model/plan/Itinerary.java @@ -162,6 +162,9 @@ public boolean isOnStreetAllTheWay() { return isStreetOnly(); } + /** + * Does this itinerary contain only street or flex legs? + */ public boolean isOnStreetAndFlexOnly() { return legs.stream().allMatch(l -> l.isStreetLeg() || l.isFlexibleTrip()); } diff --git a/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java b/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java index ef30e7af41b..6f5a6e60ebf 100644 --- a/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java +++ b/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java @@ -399,6 +399,7 @@ public void setTimetableView(boolean timetableView) { /** * Whether the trip should depart at dateTime (false, the default), or arrive at dateTime. */ + @Deprecated public boolean arriveBy() { return arriveBy; } diff --git a/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java b/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java index 854e94c1091..bd580ae4934 100644 --- a/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java +++ b/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java @@ -18,7 +18,7 @@ import org.opentripplanner.model.plan.TestItineraryBuilder; import org.opentripplanner.routing.api.request.SearchDirection; -public class OutsideSearchWindowFilterTest implements PlanTestConstants { +class OutsideSearchWindowFilterTest implements PlanTestConstants { private static final Duration SEARCH_WINDOW_10m = Duration.ofMinutes(10); private final int startTime = TimeUtils.time("09:30"); @@ -38,7 +38,7 @@ static List filterOnSearchWindowTestCases() { @ParameterizedTest(name = "{0}, edt: {1}, sw: 10m, expects flagged for removal: {2}") @MethodSource("filterOnSearchWindowTestCases") - public void filterOnSearchWindow(String description, String edt, boolean flaggedForRemoval) { + void filterOnSearchWindow(String description, String edt, boolean flaggedForRemoval) { List expected = flaggedForRemoval ? input : List.of(); var subject = new OutsideSearchWindowFilter( TestItineraryBuilder.newTime(TimeUtils.time(edt)).toInstant(), diff --git a/src/test/java/org/opentripplanner/routing/algorithm/mapping/TransitSnapshotTest.java b/src/test/java/org/opentripplanner/routing/algorithm/mapping/TransitSnapshotTest.java index 1b4b548514d..88d977f1cf0 100644 --- a/src/test/java/org/opentripplanner/routing/algorithm/mapping/TransitSnapshotTest.java +++ b/src/test/java/org/opentripplanner/routing/algorithm/mapping/TransitSnapshotTest.java @@ -138,7 +138,7 @@ public void test_trip_planning_with_transit_stop() { request.setFrom(ps); request.setTo(p3); - expectArriveByToMatchDepartAtAndSnapshot(request); + expectRequestResponseToMatchSnapshot(request); } @Test