use of edu.usf.cutr.gtfsrtvalidator.lib.validation.gtfs.StopLocationTypeValidator in project gtfs-realtime-validator by CUTR-at-USF.
the class StopLocationTypeValidatorTest method testE010.
/**
* E010 - If location_type is used in stops.txt, all stops referenced in stop_times.txt must have location_type of 0
*/
@Test
public void testE010() {
StopLocationTypeValidator stopLocationValidator = new StopLocationTypeValidator();
Map<ValidationRule, Integer> expected = new HashMap<>();
// gtfsData does not contain location_type = 1 for stop_id. Therefore returns 0 results
results = stopLocationValidator.validate(gtfsData);
for (ErrorListHelperModel error : results) {
assertEquals(0, error.getOccurrenceList().size());
}
// gtfsData2 contains location_type = 1 for stop_ids. Therefore returns errorcount = (number of location_type = 1 for stop_ids)
results = stopLocationValidator.validate(gtfsData2);
expected.put(E010, 1);
TestUtils.assertResults(expected, results);
clearAndInitRequiredFeedFields();
}
Aggregations