mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 17:10:30 +00:00
Negentwee: Fix 'type' parameter name.
This commit is contained in:
parent
e10de06c13
commit
34487194d9
2 changed files with 10 additions and 2 deletions
|
@ -212,7 +212,7 @@ public class NegentweeProvider extends AbstractNetworkProvider {
|
|||
// Add types if specified
|
||||
String locationTypes = locationTypesToQueryParameterString(types);
|
||||
if (locationTypes.length() > 0)
|
||||
queryParameters.add(new QueryParameter("types", locationTypes));
|
||||
queryParameters.add(new QueryParameter("type", locationTypes));
|
||||
|
||||
HttpUrl url = buildApiUrl("locations", queryParameters);
|
||||
final CharSequence page = httpClient.get(url);
|
||||
|
@ -724,7 +724,7 @@ public class NegentweeProvider extends AbstractNetworkProvider {
|
|||
// Add types if specified
|
||||
String locationTypes = locationTypesToQueryParameterString(types);
|
||||
if (locationTypes.length() > 0)
|
||||
queryParameters.add(new QueryParameter("types", locationTypes));
|
||||
queryParameters.add(new QueryParameter("type", locationTypes));
|
||||
|
||||
HttpUrl url = buildApiUrl("locations", queryParameters);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte.live;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -49,6 +50,13 @@ public class NegentweeProviderLiveTest extends AbstractProviderLiveTest {
|
|||
new Location(LocationType.STATION, "station-amsterdam-centraal"));
|
||||
print(result);
|
||||
assertEquals(NearbyLocationsResult.Status.OK, result.status);
|
||||
|
||||
// Assert that queryNearbyStations only returns STATION locations
|
||||
assertNotNull(result.locations);
|
||||
assertTrue(result.locations.size() > 0);
|
||||
for (Location location : result.locations) {
|
||||
assertEquals(location.type, LocationType.STATION);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue