use of org.opentripplanner.api.model.Leg in project OpenTripPlanner by opentripplanner.
the class TimeTest method test1g3.
public void test1g3() {
Leg leg = plan(+1388617380L, "1g1", "1g2", null, false, false, null, "", "");
validateLeg(leg, 1388703660000L, 1388703720000L, "1g2", "1g1", null);
}
use of org.opentripplanner.api.model.Leg in project OpenTripPlanner by opentripplanner.
the class UnplannedChangesTest method test3b1.
public void test3b1() {
Leg leg = plan(+1388530860L, "3b1", "3b2", null, false, false, null, "", "");
validateLeg(leg, 1388531460000L, 1388531520000L, "3b2", "3b1", null);
}
use of org.opentripplanner.api.model.Leg in project OpenTripPlanner by opentripplanner.
the class OptimizationTest method test2a1.
public void test2a1() {
Leg leg = plan(+1388530860L, "2a1", "2a2", null, false, false, null, "", "");
validateLeg(leg, 1388530860000L, 1388530920000L, "2a2", "2a1", null);
}
use of org.opentripplanner.api.model.Leg in project OpenTripPlanner by opentripplanner.
the class OptimizationTest method test2a2.
public void test2a2() {
Leg leg = plan(+1388530980L, "2a1", "2a2", null, false, false, null, "", "");
validateLeg(leg, 1388531100000L, 1388531160000L, "2a2", "2a1", null);
}
use of org.opentripplanner.api.model.Leg in project OpenTripPlanner by opentripplanner.
the class PatternInterlineDwellTest method testInterlining.
// TODO Allow using Calendar or ISOdate for testing, interpret it in the given graph's timezone.
public void testInterlining() {
Calendar calendar = new GregorianCalendar(2014, Calendar.JANUARY, 01, 00, 05, 00);
calendar.setTimeZone(TimeZone.getTimeZone("America/New_York"));
long time = calendar.getTime().getTime() / 1000;
// We should arrive at the destination using two legs, both of which are on
// the same route and with zero transfers.
Leg[] legs = plan(time, "stop0", "stop3", null, false, false, null, null, null, 2);
assertEquals(legs[0].routeId.getId(), "route1");
assertEquals(legs[1].routeId.getId(), "route1");
assertTrue(itinerary.transfers == 0);
}
Aggregations