mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
use Product enum in queryConnections()
This commit is contained in:
parent
9653a0420f
commit
29f719db5a
97 changed files with 547 additions and 376 deletions
|
@ -28,6 +28,7 @@ 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.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -85,7 +86,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 80000793, "München", "Ostbahnhof"), null,
|
||||
new Location(LocationType.STATION, 80000799, "München", "Pasing"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 80000799, "München", "Pasing"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -96,7 +97,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void longConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1005530, "Starnberg", "Arbeitsamt"), null,
|
||||
new Location(LocationType.STATION, 3001459, "Nürnberg", "Fallrohrstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 3001459, "Nürnberg", "Fallrohrstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
// seems like there are no more connections all the time
|
||||
|
@ -106,7 +107,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinates() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48165238, 11577473), null, new Location(
|
||||
LocationType.ADDRESS, 0, 47987199, 11326532), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ADDRESS, 0, 47987199, 11326532), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -116,7 +117,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinateAndStation() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48238341, 11478230), null, new Location(
|
||||
LocationType.ANY, 0, null, "Ostbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ANY, 0, null, "Ostbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -126,7 +127,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenAddresses() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "München, Maximilianstr. 1"), null,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -137,7 +138,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenStationAndAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1220, null, "Josephsburg"), null, new Location(
|
||||
LocationType.ADDRESS, 0, 48188018, 11574239, null, "München Frankfurter Ring 35"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
LocationType.ADDRESS, 0, 48188018, 11574239, null, "München Frankfurter Ring 35"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue