parameter for number of connections to query

This commit is contained in:
Andreas Schildbach 2012-03-20 17:58:01 +01:00
parent 0b40edff29
commit d254923b77
73 changed files with 278 additions and 252 deletions

View file

@ -81,44 +81,43 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest
@Test
public void shortConnection() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.STATION, 8503000, null, "Zürich HB"), null,
final QueryConnectionsResult result = queryConnections(provider, new Location(LocationType.STATION, 8503000, null, "Zürich HB"), null,
new Location(LocationType.STATION, 8507785, null, "Bern, Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
System.out.println(result);
final QueryConnectionsResult laterResult = provider.queryMoreConnections(result.context, true);
final QueryConnectionsResult laterResult = queryMoreConnections(provider, result.context, true);
System.out.println(laterResult);
}
@Test
public void slowConnection() throws Exception
{
final QueryConnectionsResult result = provider
.queryConnections(new Location(LocationType.ANY, 0, null, "Schocherswil, Alte Post!"), null, new Location(LocationType.ANY, 0, null,
"Laconnex, Mollach"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
final QueryConnectionsResult result = queryConnections(provider, new Location(LocationType.ANY, 0, null, "Schocherswil, Alte Post!"), null,
new Location(LocationType.ANY, 0, null, "Laconnex, Mollach"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
System.out.println(result);
final QueryConnectionsResult laterResult = provider.queryMoreConnections(result.context, true);
final QueryConnectionsResult laterResult = queryMoreConnections(provider, result.context, true);
System.out.println(laterResult);
}
@Test
public void connectionWithFootway() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, null, "Spiez, Seestraße 62"), null,
final QueryConnectionsResult result = queryConnections(provider, new Location(LocationType.ADDRESS, 0, null, "Spiez, Seestraße 62"), null,
new Location(LocationType.ADDRESS, 0, null, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
System.out.println(result);
final QueryConnectionsResult laterResult = provider.queryMoreConnections(result.context, true);
final QueryConnectionsResult laterResult = queryMoreConnections(provider, result.context, true);
System.out.println(laterResult);
}
@Test
public void connectionFromAddress() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, null,
final QueryConnectionsResult result = queryConnections(provider, new Location(LocationType.ADDRESS, 0, null,
"Dorfstrasse 10, Dällikon, Schweiz"), null, new Location(LocationType.STATION, 8500010, null, "Basel"), new Date(), true,
ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
System.out.println(result);
final QueryConnectionsResult laterResult = provider.queryMoreConnections(result.context, true);
final QueryConnectionsResult laterResult = queryMoreConnections(provider, result.context, true);
System.out.println(laterResult);
}
}