Skip to content

Commit

Permalink
add test for #6391
Browse files Browse the repository at this point in the history
  • Loading branch information
miklcct committed Jan 17, 2025
1 parent 4c3983b commit 0541650
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ public TripUpdateBuilder addDelayedStopTime(int stopSequence, int delay) {
return addStopTime(null, -1, stopSequence, delay, delay, DEFAULT_SCHEDULE_RELATIONSHIP, null);
}

public TripUpdateBuilder addDelayedArrivalStopTime(int stopSequence, int arrivalDelay) {
return addStopTime(
null,
-1,
stopSequence,
arrivalDelay,
NO_VALUE,
DEFAULT_SCHEDULE_RELATIONSHIP,
null
);
}

public TripUpdateBuilder addDelayedStopTime(
int stopSequence,
int arrivalDelay,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void complexDelay() {
var tripUpdate = new TripUpdateBuilder(TRIP_2_ID, SERVICE_DATE, SCHEDULED, TIME_ZONE)
.addDelayedStopTime(0, 0)
.addDelayedStopTime(1, 60, 80)
.addDelayedStopTime(2, 90, 90)
.addDelayedArrivalStopTime(2, 90) // must be greater than the dwell time
.build();

assertSuccess(env.applyTripUpdate(tripUpdate));
Expand Down Expand Up @@ -123,7 +123,7 @@ void complexDelay() {
env.getScheduledTimetable(TRIP_2_ID)
);
assertEquals(
"UPDATED | A1 0:01 0:01:01 | B1 0:02:10 0:02:31 | C1 0:02:50 0:02:51",
"UPDATED | A1 0:01 0:01:01 | B1 0:02:10 0:02:31 | C1 0:02:50 0:02:50",
env.getRealtimeTimetable(TRIP_2_ID)
);
}
Expand Down

0 comments on commit 0541650

Please sign in to comment.