Skip to content

Commit

Permalink
added tests for Pathway Signs and Pathway Details
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx committed Oct 15, 2024
1 parent 3a8838d commit daa8426
Showing 1 changed file with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,53 @@ public void omitsRouteColorsFeatureTest5() throws IOException, InterruptedExcept
ImmutableList.of(GtfsRouteTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}

@Test
public void containsPathwaySignsFeatureTest() throws IOException, InterruptedException {
String pathwayContent =
"pathway_id,from_stop_id,to_stop_id,pathway_mode,is_bidirectional,signposted_as,reversed_signposted_as\n"
+ "pathway1,stop1,stop2,1,1,sign1,rsign1\n"
+ "pathway2,stop2,stop3,2,0,sign2,rsign2\n";
createDataFile("pathways.txt", pathwayContent);
validateSpecFeature(
"Pathway Signs",
true,
ImmutableList.of(GtfsPathwayTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}

@Test
public void omitsPathwaySignsFeatureTest() throws IOException, InterruptedException {
String pathwayContent =
"pathway_id,from_stop_id,to_stop_id,pathway_mode,is_bidirectional\n";
createDataFile("pathways.txt", pathwayContent);
validateSpecFeature(
"Pathway Signs",
false,
ImmutableList.of(GtfsPathwayTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}

@Test
public void containsPathwayDetailsFeatureTest() throws IOException, InterruptedException {
String pathwayContent =
"pathway_id,from_stop_id,to_stop_id,pathway_mode,is_bidirectional,traversal_time,max_slope\n"
+ "pathway1,stop1,stop2,1,1,120,0\n"
+ "pathway2,stop2,stop3,2,0,300,1.1\n";
createDataFile("pathways.txt", pathwayContent);
validateSpecFeature(
"Pathway Details",
true,
ImmutableList.of(GtfsPathwayTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}

@Test
public void omitsPathwayDetailsFeatureTest() throws IOException, InterruptedException {
String pathwayContent =
"pathway_id,from_stop_id,to_stop_id,pathway_mode,is_bidirectional\n";
createDataFile("pathways.txt", pathwayContent);
validateSpecFeature(
"Pathway Details",
false,
ImmutableList.of(GtfsPathwayTableDescriptor.class, GtfsAgencyTableDescriptor.class));
}
@Test
public void containsPathwayConnectionFeatureTest() throws IOException, InterruptedException {
String pathwayContent =
Expand Down

0 comments on commit daa8426

Please sign in to comment.