mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
Rename .queryNearbyStations() to .queryNearbyLocations() and make it find POIs too.
This commit is contained in:
parent
25c2eb6176
commit
8df79805d0
84 changed files with 565 additions and 665 deletions
|
@ -18,8 +18,10 @@
|
|||
package de.schildbach.pte.live;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -28,7 +30,7 @@ import de.schildbach.pte.NetworkProvider.Accessibility;
|
|||
import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.NearbyLocationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.dto.QueryTripsResult;
|
||||
|
@ -47,17 +49,25 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
@Test
|
||||
public void nearbyStations() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = queryNearbyStations(new Location(LocationType.STATION, "3001459"));
|
||||
|
||||
final NearbyLocationsResult result = queryNearbyStations(new Location(LocationType.STATION, "3001459"));
|
||||
print(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStationsByCoordinate() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = queryNearbyStations(new Location(LocationType.ADDRESS, 48135232, 11560650));
|
||||
|
||||
final NearbyLocationsResult result = queryNearbyStations(new Location(LocationType.ADDRESS, 48135232, 11560650));
|
||||
print(result);
|
||||
assertTrue(result.locations.size() > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyLocationsByCoordinate() throws Exception
|
||||
{
|
||||
final NearbyLocationsResult result = queryNearbyLocations(EnumSet.of(LocationType.STATION, LocationType.POI), new Location(
|
||||
LocationType.ADDRESS, 48135232, 11560650));
|
||||
print(result);
|
||||
assertTrue(result.locations.size() > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -77,7 +87,6 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void suggestLocationsIncomplete() throws Exception
|
||||
{
|
||||
final SuggestLocationsResult result = suggestLocations("Marien");
|
||||
|
||||
print(result);
|
||||
}
|
||||
|
||||
|
@ -85,7 +94,6 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void suggestLocationsWithUmlaut() throws Exception
|
||||
{
|
||||
final SuggestLocationsResult result = suggestLocations("grün");
|
||||
|
||||
print(result);
|
||||
}
|
||||
|
||||
|
@ -93,7 +101,6 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void suggestLocationsAddress() throws Exception
|
||||
{
|
||||
final SuggestLocationsResult result = suggestLocations("München, Friedenstraße 2");
|
||||
|
||||
print(result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue