Skip to content

Commit

Permalink
fixed failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx committed Jan 7, 2025
1 parent 0cb80b6 commit 964e155
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ private static List<ValidationNotice> generateNotices(GtfsStopTime stopTime) {
public void forbiddenDropOffTypeShouldGenerateNotice() {
GtfsStopTime stopTime = new GtfsStopTime.Builder()
.setCsvRowNumber(1)
.setPickupType(GtfsPickupDropOff.NOT_AVAILABLE)
.setDropOffType(GtfsPickupDropOff.ALLOWED)
.setStartPickupDropOffWindow(GtfsTime.fromString("00:00:02"))
.setEndPickupDropOffWindow(GtfsTime.fromString("00:00:03"))
Expand All @@ -39,8 +40,6 @@ public void allowedDropOffTypeShouldNotGenerateNotice() {
GtfsStopTime stopTime = new GtfsStopTime.Builder()
.setCsvRowNumber(2)
.setDropOffType(GtfsPickupDropOff.NOT_AVAILABLE)
.setStartPickupDropOffWindow(GtfsTime.fromString("00:00:02"))
.setEndPickupDropOffWindow(GtfsTime.fromString("00:00:03"))
.build();
assertThat(generateNotices(stopTime)).isEmpty();
}
Expand All @@ -50,11 +49,12 @@ public void forbiddenPickupTypeShouldGenerateNotice() {
GtfsStopTime stopTime = new GtfsStopTime.Builder()
.setCsvRowNumber(3)
.setPickupType(GtfsPickupDropOff.ALLOWED)
.setDropOffType(GtfsPickupDropOff.NOT_AVAILABLE)
.setStartPickupDropOffWindow(GtfsTime.fromString("08:00:00"))
.setEndPickupDropOffWindow(GtfsTime.fromString("09:00:00"))
.build();
assertThat(generateNotices(stopTime)).containsExactly(
new PickupDropOffTypeValidator.ForbiddenPickupTypeNotice(1, GtfsTime.fromString("08:00:00"), GtfsTime.fromString("09:00:00")));
new PickupDropOffTypeValidator.ForbiddenPickupTypeNotice(3, GtfsTime.fromString("08:00:00"), GtfsTime.fromString("09:00:00")));
}

@Test
Expand Down

0 comments on commit 964e155

Please sign in to comment.