Skip to content

Commit

Permalink
renamed notice from plural to singular gate
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx committed Sep 4, 2024
1 parent 0377dae commit e9539c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class BidirectionalExitGateValidator extends SingleEntityValidator<GtfsPa
@Override
public void validate(GtfsPathway entity, NoticeContainer noticeContainer) {
if (entity.pathwayMode().getNumber() == 7 && entity.isBidirectional().getNumber() == 1) {
noticeContainer.addValidationNotice(new BidirectionalExitGatesNotice(entity));
noticeContainer.addValidationNotice(new BidirectionalExitGateNotice(entity));
}
}

Expand All @@ -32,15 +32,15 @@ public void validate(GtfsPathway entity, NoticeContainer noticeContainer) {
* <p>Exit gates (pathway_mode=7) must not be bidirectional.
*/
@GtfsValidationNotice(severity = ERROR, files = @FileRefs({GtfsPathwaySchema.class}))
static class BidirectionalExitGatesNotice extends ValidationNotice {
static class BidirectionalExitGateNotice extends ValidationNotice {
/** The row number of the validated record. */
private final int csvRowNumber;
/** The pathway mode. */
private final int pathwayMode;
/** Whether the pathway is bidirectional. */
private final int isBidirectional;

BidirectionalExitGatesNotice(GtfsPathway pathway) {
BidirectionalExitGateNotice(GtfsPathway pathway) {
this.csvRowNumber = pathway.csvRowNumber();
this.pathwayMode = pathway.pathwayMode().getNumber();
this.isBidirectional = pathway.isBidirectional().getNumber();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void isBidirectionalExitGateShouldGenerateNotice() {
NoticeContainer noticeContainer = new NoticeContainer();
new BidirectionalExitGateValidator().validate(entity, noticeContainer);
assertThat(noticeContainer.getValidationNotices())
.containsExactly(new BidirectionalExitGateValidator.BidirectionalExitGatesNotice(entity));
.containsExactly(new BidirectionalExitGateValidator.BidirectionalExitGateNotice(entity));
}

@Test
Expand Down

0 comments on commit e9539c1

Please sign in to comment.