Adapt to API change of Sydney (New South Wales)

This commit is contained in:
Andreas Schildbach 2013-12-05 10:32:51 +01:00
parent def50afd7b
commit 5f45e84a4b
2 changed files with 11 additions and 3 deletions

View file

@ -25,7 +25,7 @@ import java.util.TimeZone;
public class SydneyProvider extends AbstractEfaProvider public class SydneyProvider extends AbstractEfaProvider
{ {
public static final NetworkId NETWORK_ID = NetworkId.SYDNEY; public static final NetworkId NETWORK_ID = NetworkId.SYDNEY;
private final static String API_BASE = "http://mobile.131500.com.au/TripPlanner/mobile/"; private final static String API_BASE = "http://tp.transportnsw.info/nsw/";
public SydneyProvider() public SydneyProvider()
{ {

View file

@ -48,7 +48,7 @@ public class SydneyProviderLiveTest extends AbstractProviderLiveTest
@Test @Test
public void nearbyStations() throws Exception public void nearbyStations() throws Exception
{ {
final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 10101452), 0, 0); final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 10101101), 0, 0);
print(result); print(result);
} }
@ -64,11 +64,19 @@ public class SydneyProviderLiveTest extends AbstractProviderLiveTest
@Test @Test
public void queryDepartures() throws Exception public void queryDepartures() throws Exception
{ {
final QueryDeparturesResult result = provider.queryDepartures(10101452, 0, false); final QueryDeparturesResult result = provider.queryDepartures(10101101, 0, false);
print(result); print(result);
} }
@Test
public void autocomplete() throws Exception
{
final List<Location> autocompletes = provider.autocompleteStations("Town Hall Station");
print(autocompletes);
}
@Test @Test
public void autocompleteIncomplete() throws Exception public void autocompleteIncomplete() throws Exception
{ {