Examples of secondsSinceMidnight()


Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

            if (bestServiceDay == null) {
                throw new RuntimeException("Unable to determine on-board depart service day.");
            }

            int time = bestServiceDay.secondsSinceMidnight(opt.dateTime);

            /*
             * 3. Get the best hop from the list, given the parameters. This is done by finding the
             * last hop that has not yet departed.
             */
 
View Full Code Here

Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

        when(depart.getCoordinate()).thenReturn(new Coordinate(0, 0));
        when(dwell.getCoordinate()).thenReturn(new Coordinate(0, 0));
        when(arrive.getCoordinate()).thenReturn(new Coordinate(0, 0));
        routingRequest.from = new GenericLocation();
        routingRequest.startingTransitTripId = agencyAndId;
        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(9);

        patternHop0.setGeometry(geometry);
        tripPattern.add(tripTimes);
        graph.index = new GraphIndex(graph);
View Full Code Here

Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

        when(graph.getEdges()).thenReturn(Collections.<Edge>singletonList(patternHop));
        when(depart.getCoordinate()).thenReturn(new Coordinate(0, 0));
        when(arrive.getCoordinate()).thenReturn(new Coordinate(0, 0));
        routingRequest.from = new GenericLocation();
        routingRequest.startingTransitTripId = agencyAndId;
        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(10);
        when(graph.getVertex("Station_0")).thenReturn(station0);
        when(graph.getVertex("Station_1")).thenReturn(station1);

        tripPattern.add(tripTimes);
        graph.index = new GraphIndex(graph);
View Full Code Here

Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

        when(graph.getVertex("Station_2")).thenReturn(station2);

        tripPattern.add(tripTimes);
        graph.index = new GraphIndex(graph);

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(0);
        assertEquals(station0, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(20);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));
View Full Code Here

Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

        graph.index = new GraphIndex(graph);

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(0);
        assertEquals(station0, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(20);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(30);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));
View Full Code Here

Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

        assertEquals(station0, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(20);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(30);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(40);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));
View Full Code Here

Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(30);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(40);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(60);
        assertEquals(station2, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));
    }
View Full Code Here

Examples of org.opentripplanner.routing.core.ServiceDay.secondsSinceMidnight()

        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(40);
        assertEquals(station1, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(60);
        assertEquals(station2, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));
    }
}
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.