mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 17:38:49 +00:00
more tests
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@598 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
679543a68c
commit
7223f80dc0
1 changed files with 19 additions and 2 deletions
|
@ -27,6 +27,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Connection;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -38,6 +39,22 @@ public class BahnProviderLiveTest
|
|||
private BahnProvider provider = new BahnProvider();
|
||||
protected static final String ALL_PRODUCTS = "IRSUTBFC";
|
||||
|
||||
@Test
|
||||
public void nearbyStations() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = provider.nearbyStations("692991", 0, 0, 0, 0);
|
||||
|
||||
System.out.println(result.stations.size() + " " + result.stations);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStationsByCoordinate() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = provider.nearbyStations(null, 52525589, 13369548, 0, 0);
|
||||
|
||||
System.out.println(result.stations.size() + " " + result.stations);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryDepartures() throws Exception
|
||||
{
|
||||
|
@ -73,8 +90,8 @@ public class BahnProviderLiveTest
|
|||
@Test
|
||||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, null, "Berlin"), null, new Location(
|
||||
LocationType.ANY, 0, null, "Leipzig"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.STATION, 8011160, null, "Berlin Hbf"), null,
|
||||
new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
for (final Connection connection : result.connections)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue