예제 #1
0
 @Test
 public void canConstructStopSearchUrl() throws Exception {
   assertEquals(
       "http://buses.eelpieconsulting.co.uk/stops/search?q=53550",
       urlBuilder.getStopSearchUrl("53550"));
 }
예제 #2
0
 @Test
 public void canSourceFileInformationUrl() throws Exception {
   assertEquals(
       "http://buses.eelpieconsulting.co.uk/sources", urlBuilder.getSourceFileInformationUrl());
 }
예제 #3
0
 @Test
 public void canConstructMultipleStopMessagesUrl() throws Exception {
   assertEquals(
       "http://buses.eelpieconsulting.co.uk/messages?stops=53550,53551",
       urlBuilder.getStopMessagesUrl(new int[] {53550, 53551}));
 }
예제 #4
0
 @Test
 public void canConstructUrlForRouteStops() throws Exception {
   assertEquals(
       "http://buses.eelpieconsulting.co.uk/route/N22/1/stops",
       urlBuilder.getRoutesStopUrl("N22", 1));
 }
예제 #5
0
 @Test
 public void canConstructUrlForStopIdSearch() throws Exception {
   assertEquals(
       "http://buses.eelpieconsulting.co.uk/stop/53550", urlBuilder.getStopIdSearchUrl(53550));
 }
예제 #6
0
 @Test
 public void canConstructUrlForNearbyRoutesSearch() throws Exception {
   assertEquals(
       "http://buses.eelpieconsulting.co.uk/routes/near?latitude=51.454&longitude=-0.351",
       urlBuilder.getNearbyRoutesUrl(51.454, -0.351, 250));
 }
예제 #7
0
 @Test
 public void canConstructUrlForStopBoardJSONRequest() {
   assertEquals(
       "http://buses.eelpieconsulting.co.uk/stop/53550/arrivals",
       urlBuilder.getStopBoardUrl(53550));
 }