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:
andreas.schildbach 2010-10-17 14:17:11 +00:00
parent b990d82f8e
commit b9f572b658
10 changed files with 515 additions and 69 deletions

View file

@ -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
{