mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-06 15:18:49 +00:00
Navitia: Also suggest POI and administrative locations
The administrative areas are extremely useful when people search for a suburb, but no stops have the suburbs name. They are currently mapped to a POI location.
This commit is contained in:
parent
889a85b745
commit
2adf627e51
3 changed files with 47 additions and 2 deletions
|
@ -250,6 +250,26 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
|
|||
print(result);
|
||||
}
|
||||
|
||||
protected final void queryTripFromAdminToPoi(final CharSequence from, final CharSequence to) throws IOException
|
||||
{
|
||||
final SuggestLocationsResult fromResult = suggestLocations(from);
|
||||
assertTrue(fromResult.getLocations().size() > 0);
|
||||
Location fromLocation = fromResult.getLocations().get(0);
|
||||
assertEquals(fromLocation.type, LocationType.POI);
|
||||
print(fromResult);
|
||||
|
||||
final SuggestLocationsResult toResult = suggestLocations(to);
|
||||
assertTrue(toResult.getLocations().size() > 0);
|
||||
Location toLocation = toResult.getLocations().get(0);
|
||||
assertEquals(toLocation.type, LocationType.POI);
|
||||
print(toResult);
|
||||
|
||||
final QueryTripsResult tripsResult = queryTrips(fromLocation, null, toLocation, new Date(), true,
|
||||
Product.ALL, NetworkProvider.WalkSpeed.NORMAL, NetworkProvider.Accessibility.NEUTRAL);
|
||||
assertEquals(QueryTripsResult.Status.OK, tripsResult.status);
|
||||
print(tripsResult);
|
||||
}
|
||||
|
||||
protected final void queryMoreTrips(final CharSequence from, final CharSequence to) throws IOException
|
||||
{
|
||||
final SuggestLocationsResult fromResult = suggestLocations(from);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue