Location now has constructor without geo coordinates

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@417 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2010-12-26 19:21:12 +00:00
parent a26e762a6b
commit e2b9bc96a9
23 changed files with 114 additions and 98 deletions

View file

@ -22,8 +22,8 @@ import java.util.List;
import org.junit.Test;
import de.schildbach.pte.SbbProvider;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.SbbProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyStationsResult;
@ -73,8 +73,8 @@ public class SbbProviderLiveTest
@Test
public void shortConnection() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.STATION, 8503000, 0, 0, "Zürich HB"), null,
new Location(LocationType.STATION, 8507785, 0, 0, "Bern, Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.STATION, 8503000, "Zürich HB"), null, new Location(
LocationType.STATION, 8507785, "Bern, Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
System.out.println(result);
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
System.out.println(moreResult);
@ -83,8 +83,8 @@ public class SbbProviderLiveTest
@Test
public void slowConnection() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, 0, 0, "Schocherswil, Alte Post!"), null,
new Location(LocationType.ANY, 0, 0, 0, "Laconnex, Mollach"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, "Schocherswil, Alte Post!"), null,
new Location(LocationType.ANY, 0, "Laconnex, Mollach"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
System.out.println(result);
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
System.out.println(moreResult);
@ -93,8 +93,8 @@ public class SbbProviderLiveTest
@Test
public void connectionWithFootway() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, 0, 0, "Spiez, Seestraße 62"), null,
new Location(LocationType.ADDRESS, 0, 0, 0, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, "Spiez, Seestraße 62"), null,
new Location(LocationType.ADDRESS, 0, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
System.out.println(result);
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
System.out.println(moreResult);