use of org.opentripplanner.model.GenericLocation in project OpenTripPlanner by opentripplanner.
the class LocationStringParserTest method testWithId.
@Test
public void testWithId() {
GenericLocation loc = LocationStringParser.fromOldStyleString("name::aFeed:A1B2C3");
assertEquals("name", loc.label);
assertEquals(loc.stopId, new FeedScopedId("aFeed", "A1B2C3"));
assertNull(loc.lat);
assertNull(loc.lng);
assertNull(loc.getCoordinate());
loc = LocationStringParser.fromOldStyleString("feed:4321");
assertNull(loc.label);
assertEquals(loc.stopId, new FeedScopedId("feed", "4321"));
assertNull(loc.lat);
assertNull(loc.lng);
assertNull(loc.getCoordinate());
}
use of org.opentripplanner.model.GenericLocation in project OpenTripPlanner by opentripplanner.
the class LocationStringParserTest method testFromOldStyleString.
@Test
public void testFromOldStyleString() {
GenericLocation loc = LocationStringParser.fromOldStyleString("name::12345");
assertEquals("name", loc.label);
assertNull(loc.stopId);
assertNull(loc.lat);
assertNull(loc.lng);
assertNull(loc.getCoordinate());
}
use of org.opentripplanner.model.GenericLocation in project OpenTripPlanner by opentripplanner.
the class TestIntermediatePlaces method testThreeBusStopPlaces.
@Test
public void testThreeBusStopPlaces() {
GenericLocation fromLocation = new GenericLocation(39.9058, -83.1341);
GenericLocation toLocation = new GenericLocation(39.9058, -82.8841);
GenericLocation[] intermediateLocations = { new GenericLocation(39.9058, -82.9841) };
handleRequest(fromLocation, toLocation, intermediateLocations, new TraverseModeSet(TraverseMode.TRANSIT), false);
handleRequest(fromLocation, toLocation, intermediateLocations, new TraverseModeSet(TraverseMode.TRANSIT), true);
}
use of org.opentripplanner.model.GenericLocation in project OpenTripPlanner by opentripplanner.
the class TestIntermediatePlaces method testTwoIntermediatePlaces.
@Test
@Ignore
public void testTwoIntermediatePlaces() {
GenericLocation fromLocation = new GenericLocation(39.93080, -82.98522);
GenericLocation toLocation = new GenericLocation(39.96383, -82.96291);
GenericLocation[] intermediateLocations = new GenericLocation[2];
intermediateLocations[0] = new GenericLocation(39.92099, -82.95570);
intermediateLocations[1] = new GenericLocation(39.96146, -82.99552);
handleRequest(fromLocation, toLocation, intermediateLocations, new TraverseModeSet(TraverseMode.CAR), false);
handleRequest(fromLocation, toLocation, intermediateLocations, new TraverseModeSet(TraverseMode.CAR), true);
}
use of org.opentripplanner.model.GenericLocation in project OpenTripPlanner by opentripplanner.
the class TestIntermediatePlaces method testTransitTwoIntermediatePlaces.
@Test
public void testTransitTwoIntermediatePlaces() {
GenericLocation fromLocation = new GenericLocation(39.9908, -83.0118);
GenericLocation toLocation = new GenericLocation(39.9998, -83.0198);
GenericLocation[] intermediateLocations = new GenericLocation[2];
intermediateLocations[0] = new GenericLocation(40.0000, -82.900);
intermediateLocations[1] = new GenericLocation(39.9100, -83.100);
handleRequest(fromLocation, toLocation, intermediateLocations, new TraverseModeSet(TraverseMode.TRANSIT, TraverseMode.WALK), false);
handleRequest(fromLocation, toLocation, intermediateLocations, new TraverseModeSet(TraverseMode.TRANSIT, TraverseMode.WALK), true);
}
Aggregations