Package org.opentripplanner.routing.services

Examples of org.opentripplanner.routing.services.AlertPatchService


    }

    @Override
    protected void configurePolling(Graph graph, Preferences preferences) throws Exception {
        // TODO: add options to choose different patch services
        AlertPatchService alertPatchService = new AlertPatchServiceImpl(graph);
        this.alertPatchService = alertPatchService;
        String url = preferences.get("url", null);
        if (url == null) {
            throw new IllegalArgumentException("Missing mandatory 'url' parameter");
        }
View Full Code Here


    }

    /** Smoke test for patcher */
    public void testPatcher() {
        AlertPatcher p = new AlertPatcher();
        AlertPatchService service = mock(AlertPatchService.class);
        when(service.getStopPatches(any(AgencyAndId.class))).thenReturn(new ArrayList<AlertPatch>());
        when(service.getRoutePatches(any(AgencyAndId.class))).thenReturn(new ArrayList<AlertPatch>());

        p.alertPatchService = service;
        AlertPatchResponse stopPatches = p.getStopPatches("TriMet", "5678");
        assertNull(stopPatches.alertPatches);
        AlertPatchResponse routePatches = p.getRoutePatches("TriMet", "100");
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.services.AlertPatchService

Copyright © 2018 www.massapicom. 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.