Skip to content

Commit

Permalink
fixed broken test and formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx committed Jan 22, 2024
1 parent 5cbbf8d commit 360712d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ private void loadTimeBaedFaresComponent(GtfsFeedContainer feedContainer) {
}

private void loadTransferRulesComponent(GtfsFeedContainer feedContainer) {
specFeatures.put("Transfer Rules", hasAtLeastOneRecordInFile(feedContainer, GtfsFareTransferRule.FILENAME));
specFeatures.put(
"Transfer Rules", hasAtLeastOneRecordInFile(feedContainer, GtfsFareTransferRule.FILENAME));
}

private void loadLevelsComponent(GtfsFeedContainer feedContainer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public Status run(ValidationRunnerConfig config) {
try {
Optional<String> optionalValue = versionInfo.currentVersion();
if (optionalValue.isPresent()) {
gtfsInput = createGtfsInput(config, versionInfo.currentVersion().get(), noticeContainer);
gtfsInput = createGtfsInput(config, versionInfo.currentVersion().get(), noticeContainer);
}
} catch (IOException e) {
logger.atSevere().withCause(e).log("Cannot load GTFS feed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ public void validate(NoticeContainer noticeContainer) {
for (GtfsAgency agency : agencyTable.getEntities()) {
if (agency.hasAgencyLang() && !feedLang.equals(agency.agencyLang())) {
noticeContainer.addValidationNotice(
new FeedInfoLangAndAgencyLangMismatchNotice(
agency.csvRowNumber(),
agency.agencyId(),
agency.agencyName(),
agency.agencyLang().toLanguageTag(),
feedLang.toLanguageTag()));
new FeedInfoLangAndAgencyLangMismatchNotice(
agency.csvRowNumber(),
agency.agencyId(),
agency.agencyName(),
agency.agencyLang().toLanguageTag(),
feedLang.toLanguageTag()));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void containsFrequencyBasedTripComponentTest() throws IOException, Interr
"trip_id, start_time, end_time, headway_secs\n" + "dummy1, 01:01:01, 01:01:02, 1\n";
createDataFile(GtfsFrequency.FILENAME, content);
validateSpecFeature(
"Frequency-Based Trip",
"Frequencies",
true,
ImmutableList.of(GtfsFrequencyTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}
Expand All @@ -314,7 +314,7 @@ public void omitsFrequencyBasedTripComponentTest() throws IOException, Interrupt
String content = "trip_id, start_time, end_time, headway_secs\n";
createDataFile(GtfsFrequency.FILENAME, content);
validateSpecFeature(
"Frequency-Based Trip",
"Frequencies",
false,
ImmutableList.of(GtfsFrequencyTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}
Expand Down Expand Up @@ -406,11 +406,11 @@ public void omitsFareMediaComponentTest() throws IOException, InterruptedExcepti
@Test
public void containsZoneBasedFaresComponentTest() throws IOException, InterruptedException {
String content = "area_id, stop_id\n" + "dummyArea, dummyStop\n";
createDataFile(GtfsStopArea.FILENAME, content);
createDataFile(GtfsArea.FILENAME, content);
validateSpecFeature(
"Zone-Based Fares",
true,
ImmutableList.of(GtfsStopAreaTableDescriptor.class, GtfsAgencyTableDescriptor.class));
ImmutableList.of(GtfsAreaTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}

@Test
Expand Down

0 comments on commit 360712d

Please sign in to comment.