mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-21 01:39:51 +00:00
LU: Migrate to Hafas client interface.
This commit is contained in:
parent
ec05c0a519
commit
bab9b0d39f
3 changed files with 21 additions and 41 deletions
|
@ -37,13 +37,7 @@ import de.schildbach.pte.dto.SuggestLocationsResult;
|
|||
*/
|
||||
public class LuProviderLiveTest extends AbstractProviderLiveTest {
|
||||
public LuProviderLiveTest() {
|
||||
super(new LuProvider());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStations() throws Exception {
|
||||
final NearbyLocationsResult result = queryNearbyStations(new Location(LocationType.STATION, "200501001"));
|
||||
print(result);
|
||||
super(new LuProvider(secretProperty("lu.api_authorization")));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -72,9 +66,9 @@ public class LuProviderLiveTest extends AbstractProviderLiveTest {
|
|||
|
||||
@Test
|
||||
public void shortTrip() throws Exception {
|
||||
final QueryTripsResult result = queryTrips(
|
||||
new Location(LocationType.STATION, "200416001", null, "Cité Aéroport"), null,
|
||||
new Location(LocationType.STATION, "200405035", "Luxembourg", "Gare Centrale"), new Date(), true, null);
|
||||
final Location from = new Location(LocationType.STATION, "200416001", null, "Cité Aéroport");
|
||||
final Location to = new Location(LocationType.STATION, "200405035", "Luxembourg", "Gare Centrale");
|
||||
final QueryTripsResult result = queryTrips(from, null, to, new Date(), true, null);
|
||||
print(result);
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
print(laterResult);
|
||||
|
@ -90,4 +84,13 @@ public class LuProviderLiveTest extends AbstractProviderLiveTest {
|
|||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
print(laterResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void tripBetweenCoordinates() throws Exception {
|
||||
final Location from = Location.coord(Point.fromDouble(49.5999681, 6.1342493)); // Luxembourg Central
|
||||
// Station
|
||||
final Location to = Location.coord(Point.fromDouble(49.5956369, 6.1200199)); // Hollerich
|
||||
final QueryTripsResult result = queryTrips(from, null, to, new Date(), true, null);
|
||||
print(result);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,5 +17,6 @@ vao.api_authorization =
|
|||
zvv.api_authorization =
|
||||
dsb.api_authorization =
|
||||
se.api_authorization =
|
||||
lu.api_authorization =
|
||||
hsl.usertoken =
|
||||
hsl.passphrase =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue