mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
fixed/added short connection tests
This commit is contained in:
parent
c99ad70e1b
commit
1548523cd2
28 changed files with 630 additions and 23 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;
|
||||
|
||||
|
@ -87,7 +90,25 @@ public class BvbProviderLiveTest extends AbstractProviderLiveTest
|
|||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 10000, null, "Bahnhof"), null, new Location(
|
||||
LocationType.STATION, 86, null, "Markthalle"), 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