Skip to content

Commit

Permalink
fix: correct field name in missing_recommended_field_notice (#1574) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelandrewkearney authored Mar 12, 2024
1 parent f91e524 commit dee5802
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public void validate(NoticeContainer noticeContainer) {
if (!agency.hasAgencyId()) {
noticeContainer.addValidationNotice(
new MissingRecommendedFieldNotice(
agencyTable.gtfsFilename(), agency.csvRowNumber(), agency.agencyName()));
agencyTable.gtfsFilename(),
agency.csvRowNumber(),
GtfsAgency.AGENCY_ID_FIELD_NAME));
}
// no further validation required
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public void singleAgencyPresentButNoAgencyIdSetShouldGenerateWarningNotice() {
ZoneId.of("America/Montreal"),
Locale.CANADA)));
assertThat(notices)
.containsExactly(new MissingRecommendedFieldNotice("agency.txt", 0, "agency name"));
.containsExactly(
new MissingRecommendedFieldNotice(
GtfsAgency.FILENAME, 0, GtfsAgency.AGENCY_ID_FIELD_NAME));
}

@Test
Expand All @@ -95,7 +97,9 @@ public void multipleAgenciesPresentButNoAgencyIdSetShouldGenerateErrorNotice() {
ZoneId.of("America/Montreal"),
Locale.CANADA)));
assertThat(notices)
.containsExactly(new MissingRequiredFieldNotice("agency.txt", 1, "agency_id"));
.containsExactly(
new MissingRequiredFieldNotice(
GtfsAgency.FILENAME, 1, GtfsAgency.AGENCY_ID_FIELD_NAME));
}

@Test
Expand Down

0 comments on commit dee5802

Please sign in to comment.