product selection for directions

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@241 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-10-05 14:26:30 +00:00
parent 89da3a9bba
commit dcd673d6f7
21 changed files with 172 additions and 59 deletions

View file

@ -33,7 +33,8 @@ import de.schildbach.pte.dto.QueryDeparturesResult;
public class LinzProviderLiveTest
{
private LinzProvider provider = new LinzProvider();
private static final String ALL_PRODUCTS = "IRSUTBFC";
@Test
public void queryDepartures() throws Exception
{
@ -45,48 +46,49 @@ public class LinzProviderLiveTest
public void shortConnection() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(LocationType.STATION, "Linz Hauptbahnhof", null, null, LocationType.STATION,
"Linz Auwiesen", new Date(), true, WalkSpeed.FAST);
"Linz Auwiesen", new Date(), true, ALL_PRODUCTS, WalkSpeed.FAST);
System.out.println(result);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
}
@Test
public void longConnection() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(LocationType.STATION, "Linz Auwiesen", null, null, LocationType.STATION,
"Linz Hafen", new Date(), true, WalkSpeed.SLOW);
"Linz Hafen", new Date(), true, ALL_PRODUCTS, WalkSpeed.SLOW);
System.out.println(result);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
}
@Test
public void connectionBetweenCoordinates() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(LocationType.WGS84, "48165238,11577473", null, null, LocationType.WGS84,
"47987199,11326532", new Date(), true, WalkSpeed.NORMAL);
"47987199,11326532", new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
System.out.println(result);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
}
@Test public void connectionBetweenCoordinateAndStation() throws Exception
@Test
public void connectionBetweenCoordinateAndStation() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(LocationType.WGS84, "48238341,11478230", null, null, LocationType.ANY,
"Ostbahnhof", new Date(), true, WalkSpeed.NORMAL);
"Ostbahnhof", new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
System.out.println(result);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
}
@Test
public void connectionBetweenAddresses() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(LocationType.ADDRESS, "München, Maximilianstr. 1", null, null,
LocationType.ADDRESS, "Starnberg, Jahnstraße 50", new Date(), true, WalkSpeed.NORMAL);
LocationType.ADDRESS, "Starnberg, Jahnstraße 50", new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
System.out.println(result);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
// final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
// System.out.println(moreResult);
}
}