use of com.graphhopper.reader.ConditionalTagInspector in project graphhopper by graphhopper.
the class ConditionalOSMTagInspectorTest method testConditionalAllowanceSingleDay.
@Test
public void testConditionalAllowanceSingleDay() {
Calendar cal = getCalendar(2015, Calendar.DECEMBER, 27);
ConditionalTagInspector acceptor = new ConditionalOSMTagInspector(cal, getSampleConditionalTags(), getSampleRestrictedValues(), getSamplePermissiveValues());
ReaderWay way = new ReaderWay(1);
way.setTag("vehicle:conditional", "yes @ (Su)");
assertTrue(acceptor.isRestrictedWayConditionallyPermitted(way));
}
use of com.graphhopper.reader.ConditionalTagInspector in project graphhopper by graphhopper.
the class ConditionalOSMTagInspectorTest method testConditionalReject.
@Test
public void testConditionalReject() {
Calendar cal = getCalendar(2014, Calendar.MARCH, 10);
ConditionalTagInspector acceptor = new ConditionalOSMTagInspector(cal, getSampleConditionalTags(), getSampleRestrictedValues(), getSamplePermissiveValues());
ReaderWay way = new ReaderWay(1);
way.setTag("vehicle:conditional", "no @ (Mar 10-Aug 14)");
assertTrue(acceptor.isPermittedWayConditionallyRestricted(way));
}
Aggregations