AbstractEfaProvider: Support poiIDs in mobile API.

This commit is contained in:
Andreas Schildbach 2018-12-17 19:02:38 +01:00
parent de4a94014a
commit fa98ef4bbd
2 changed files with 20 additions and 13 deletions

View file

@ -96,6 +96,14 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
assertThat(result.getLocations(), hasItem(new Location(LocationType.STATION, "1000921")));
}
@Test
public void suggestLocationsPOI() throws Exception {
final SuggestLocationsResult result = suggestLocations("Ruhpolding, Seehaus");
print(result);
assertThat(result.getLocations(), hasItem(new Location(LocationType.POI,
"poiID:40499046:9189140:-1:Seehaus:Ruhpolding:Seehaus:ANY:POI:1405062:5941100:MRCV:BAY")));
}
@Test
public void suggestLocationsAddress() throws Exception {
final SuggestLocationsResult result = suggestLocations("München, Friedenstraße 2");
@ -195,16 +203,14 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenPOIs() throws Exception {
final Location from = new Location(LocationType.POI, null, Point.from1E6(47710568, 12621970), null,
"Ruhpolding, Seehaus");
final Location to = new Location(LocationType.POI, null, Point.from1E6(47738372, 12630996), null,
"Ruhpolding, Unternberg-Bahn");
final Location from = new Location(LocationType.POI,
"poiID:40499046:9189140:-1:Seehaus:Ruhpolding:Seehaus:ANY:POI:1405062:5941100:MRCV:BAY", "Ruhpolding",
"Seehaus");
final Location to = new Location(LocationType.POI,
"poiID:40215904:9189140:-1:Alpengasthof Laubau:Ruhpolding:Alpengasthof Laubau:ANY:POI:1409082:5938642:MRCV:BAY",
"Ruhpolding", "Alpengasthof Laubau");
final QueryTripsResult result = queryTrips(from, null, to, new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
return;
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
}