mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
added 2011 to copyright
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@540 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
babdb1733a
commit
71ca97ccfb
116 changed files with 166 additions and 121 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2010 the original author or authors.
|
||||
* Copyright 2010, 2011 the original author or authors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -36,6 +36,15 @@ import de.schildbach.pte.dto.QueryDeparturesResult;
|
|||
public class SncbProviderLiveTest
|
||||
{
|
||||
private final SncbProvider provider = new SncbProvider();
|
||||
private static final String ALL_PRODUCTS = "IRSUTBFC";
|
||||
|
||||
@Test
|
||||
public void nearbyStation() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = provider.nearbyStations("100080", 0, 0, 0, 0);
|
||||
|
||||
System.out.println(result.stations.size() + " " + result.stations);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryDepartures() throws Exception
|
||||
|
@ -53,6 +62,14 @@ public class SncbProviderLiveTest
|
|||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autoCompleteAddress() throws Exception
|
||||
{
|
||||
final List<Location> autocompletes = provider.autocompleteStations("Rue Paul Janson 9, 1030 Bruxelles");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
private void list(final List<Location> autocompletes)
|
||||
{
|
||||
System.out.print(autocompletes.size() + " ");
|
||||
|
@ -80,10 +97,13 @@ public class SncbProviderLiveTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStation() throws Exception
|
||||
public void connectionFromAddress() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = provider.nearbyStations("100080", 0, 0, 0, 0);
|
||||
|
||||
System.out.println(result.stations.size() + " " + result.stations);
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, null,
|
||||
"Bruxelles - Haren, Rue Paul Janson 9"), null, new Location(LocationType.STATION, 8500010, null, "Basel"), new Date(), true,
|
||||
ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue