Examples of Leg


Examples of org.opentripplanner.api.model.Leg

        // Ban trips with ids 190W1280 and 190W1260 from agency with id TriMet
        planner.setBannedTrips(Arrays.asList("TriMet:190W1280,TriMet:190W1260"));
        // Do the planning
        Response response = planner.getItineraries();
        Itinerary itinerary = response.getPlan().itinerary.get(0);
        Leg leg = itinerary.legs.get(1);
        // Without bannedTrips this leg would contain a trip with id 190W1280
        assertFalse(leg.tripId.equals("190W1280"));
        // Instead a trip is now expected with id 190W1290
        assertTrue(leg.tripId.equals("190W1290"));
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

        planner.setBannedStops(Arrays.asList("TriMet:2106,TriMet:2107"));
        // Do the planning
        Response response = planner.getItineraries();
        // First check the request
        Itinerary itinerary = response.getPlan().itinerary.get(0);
        Leg leg = itinerary.legs.get(1);
        // Without bannedStops this leg would stop at the stop with id 2107
        assertFalse(leg.to.stopId.getId().equals("2107"));
        // Instead a stop is now expected with id 2109
        assertTrue(leg.to.stopId.getId().equals("2109"));
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

        // Do the planning
        Response response = planner.getItineraries();
        // First check the request
        Itinerary itinerary = response.getPlan().itinerary.get(0);
        Leg leg = itinerary.legs.get(1);
        // Validate that this leg uses trip 190W1280
        assertTrue(leg.tripId.equals("190W1280"));

        // Ban stop hard with id 2009 from agency with id TriMet
        // This is a stop that will be passed when using trip 190W1280
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

    public final String getFeedName() {
        return "mmri/2b";
    }

    public void test2b1() {
        Leg leg = plan(+1388530860L, "2b1", "2b2", null, true, false, null, "", "");

        validateLeg(leg, 1388530980000L, 1388531040000L, "2b2", "2b1", null);
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

    public final String getFeedName() {
        return "mmri/2a1";
    }

    public void test2a1() {
        Leg leg = plan(+1388530860L, "2a1", "2a2", null, false, false, null, "", "");

        validateLeg(leg, 1388530860000L, 1388530920000L, "2a2", "2a1", null);
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

        validateLeg(leg, 1388530860000L, 1388530920000L, "2a2", "2a1", null);
    }

    public void test2a2() {
        Leg leg = plan(+1388530980L, "2a1", "2a2", null, false, false, null, "", "");

        validateLeg(leg, 1388531100000L, 1388531160000L, "2a2", "2a1", null);
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

    public final String getFeedName() {
        return "mmri/3b";
    }

    public void test3b1() {
        Leg leg = plan(+1388530860L, "3b1", "3b2", null, false, false, null, "", "");

        validateLeg(leg, 1388531460000L, 1388531520000L, "3b2", "3b1", null);
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

        validateLeg(leg, 1388531460000L, 1388531520000L, "3b2", "3b1", null);
    }

    public void test3b2() {
        Leg leg = plan(+1388531460L, "3b1", "3b2", null, false, false, null, "", "");

        validateLeg(leg, 1388531460000L, 1388531520000L, "3b2", "3b1", null);
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

    public final String getFeedName() {
        return "mmri/3e";
    }

    public void test3e1() {
        Leg leg = plan(+1388530860L, "3e1", "3e2", null, false, false, null, "", "");

        validateLeg(leg, 1388530980000L, 1388531040000L, "3e2", "3e1", null);
    }
View Full Code Here

Examples of org.opentripplanner.api.model.Leg

    public final String getFeedName() {
        return "mmri/3f";
    }

    public void test3f1() {
        Leg leg = plan(+1388530860L, "3f1", "3f3", null, false, false, null, "", "3f2");

        validateLeg(leg, 1388530860000L, 1388531040000L, "3f3", "3f1", null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.