mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 06:19:50 +00:00
querying for connections uses Location for from, via and to parameters
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@249 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
8797d02a4b
commit
e282106c00
24 changed files with 308 additions and 557 deletions
|
@ -23,6 +23,7 @@ import org.junit.Test;
|
|||
|
||||
import de.schildbach.pte.OebbProvider;
|
||||
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;
|
||||
|
@ -46,8 +47,8 @@ public class OebbProviderLiveTest
|
|||
@Test
|
||||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(LocationType.ANY, "Linz", null, null, LocationType.ANY, "Berlin", new Date(),
|
||||
true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, 0, 0, "Linz"), null, new Location(
|
||||
LocationType.ANY, 0, 0, 0, "Berlin"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
|
||||
System.out.println(moreResult);
|
||||
|
@ -56,8 +57,8 @@ public class OebbProviderLiveTest
|
|||
@Test
|
||||
public void slowConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(LocationType.ANY, "Ramsen, Zoll", null, null, LocationType.ANY, "Azuga",
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, 0, 0, "Ramsen, Zoll"), null, new Location(
|
||||
LocationType.ANY, 0, 0, 0, "Azuga"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
|
||||
System.out.println(moreResult);
|
||||
|
@ -66,8 +67,8 @@ public class OebbProviderLiveTest
|
|||
@Test
|
||||
public void connectionWithFootway() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(LocationType.ANY, "Graz, Haselweg", null, null, LocationType.ADDRESS,
|
||||
"Innsbruck, Gumppstraße 69", new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, 0, 0, "Graz, Haselweg"), null,
|
||||
new Location(LocationType.ADDRESS, 0, 0, 0, "Innsbruck, Gumppstraße 69"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
|
||||
System.out.println(moreResult);
|
||||
|
@ -76,8 +77,9 @@ public class OebbProviderLiveTest
|
|||
@Test
|
||||
public void connectionWithFootway2() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(LocationType.ANY, "Wien, Krottenbachstraße 110!", null, null,
|
||||
LocationType.ADDRESS, "Wien, Meidlinger Hauptstraße 1", new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
final QueryConnectionsResult result = provider
|
||||
.queryConnections(new Location(LocationType.ANY, 0, 0, 0, "Wien, Krottenbachstraße 110!"), null, new Location(LocationType.ADDRESS,
|
||||
0, 0, 0, "Wien, Meidlinger Hauptstraße 1"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
|
||||
System.out.println(moreResult);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue