mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 01:19:49 +00:00
rudimentary connnections using API for Belgium and Switzerland
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@302 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
b990d82f8e
commit
b9f572b658
10 changed files with 515 additions and 69 deletions
|
@ -16,13 +16,17 @@
|
|||
*/
|
||||
package de.schildbach.pte.live;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import de.schildbach.pte.SncbProvider;
|
||||
import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
|
@ -47,6 +51,24 @@ public class SncbProviderLiveTest
|
|||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.STATION, 100024, 0, 0, null), null, new Location(
|
||||
LocationType.STATION, 100066, 0, 0, null), new Date(), true, null, WalkSpeed.FAST);
|
||||
|
||||
System.out.println(result.status + " " + result.connections);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void longConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.STATION, 100024, 0, 0, null), null, new Location(
|
||||
LocationType.STATION, 103624, 0, 0, null), new Date(), true, null, WalkSpeed.FAST);
|
||||
|
||||
System.out.println(result.status + " " + result.connections);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStation() throws Exception
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue