mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 06:08:52 +00:00
more address tests
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@364 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
82a9bf3380
commit
cc9d02175f
3 changed files with 51 additions and 0 deletions
|
@ -99,4 +99,26 @@ public class GvhProviderLiveTest
|
|||
null, new Location(LocationType.STATION, 25001141, 0, 0, "Hannover Bismarckstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.FAST);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenAnyAndAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, 53069619, 8799202,
|
||||
"bremen, neustadtswall 12"), null, new Location(LocationType.ADDRESS, 0, 53104124, 8788575, "Bremen Glücksburger Straße 37"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenAddresses() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, 53622859, 10133545,
|
||||
"Zamenhofweg 14, 22159 Hamburg, Deutschland"), null, new Location(LocationType.ADDRESS, 0, 53734260, 9674990,
|
||||
"Lehmkuhlen 5, 25337 Elmshorn, Deutschland"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,16 @@
|
|||
*/
|
||||
package de.schildbach.pte.live;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import de.schildbach.pte.KvvProvider;
|
||||
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;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
/**
|
||||
|
@ -28,6 +34,7 @@ import de.schildbach.pte.dto.QueryDeparturesResult;
|
|||
public class KvvProviderLiveTest
|
||||
{
|
||||
private final KvvProvider provider = new KvvProvider();
|
||||
private static final String ALL_PRODUCTS = "IRSUTBFC";
|
||||
|
||||
@Test
|
||||
public void nearbyStation() throws Exception
|
||||
|
@ -44,4 +51,15 @@ public class KvvProviderLiveTest
|
|||
|
||||
System.out.println(result.departures.size() + " " + result.departures);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenAddresses() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, 48985089, 8402709,
|
||||
"Konstanzer Straße 17, 76199 Karlsruhe, Deutschland"), null, new Location(LocationType.ADDRESS, 0, 49007706, 8356358,
|
||||
"Durmersheimer Straße 6, 76185 Karlsruhe, Deutschland"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,4 +83,15 @@ public class MvvProviderLiveTest
|
|||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenStationAndAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.STATION, 1220, 0, 0, "Josephsburg"), null,
|
||||
new Location(LocationType.ADDRESS, 0, 48188018, 11574239, "München Frankfurter Ring 35"), new Date(), true, ALL_PRODUCTS,
|
||||
WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue