mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
don't use non-unique efa routeIndex/routeTripIndex'es
This commit is contained in:
parent
47a2e6dc78
commit
c99ad70e1b
23 changed files with 279 additions and 13 deletions
|
@ -17,6 +17,9 @@
|
|||
|
||||
package de.schildbach.pte.live;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -76,10 +79,29 @@ public class VagfrProviderLiveTest extends AbstractProviderLiveTest
|
|||
@Test
|
||||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 0, null, "Hauptwache"), null, new Location(
|
||||
LocationType.STATION, 0, null, "Südbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 6930100, null, "Freiburg Bertoldsbrunnen"), null,
|
||||
new Location(LocationType.STATION, 6930101, null, "Freiburg Siegesdenkmal"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
||||
if (!result.context.canQueryLater())
|
||||
return;
|
||||
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
||||
if (!laterResult.context.canQueryLater())
|
||||
return;
|
||||
|
||||
final QueryConnectionsResult later2Result = queryMoreConnections(laterResult.context, true);
|
||||
System.out.println(later2Result);
|
||||
|
||||
if (!later2Result.context.canQueryEarlier())
|
||||
return;
|
||||
|
||||
final QueryConnectionsResult earlierResult = queryMoreConnections(later2Result.context, false);
|
||||
System.out.println(earlierResult);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue