mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 08:40:29 +00:00
Fix autocomplete coverage for Freiburg.
This commit is contained in:
parent
ae00988db7
commit
9539b74cd6
2 changed files with 10 additions and 10 deletions
|
@ -17,13 +17,9 @@
|
||||||
|
|
||||||
package de.schildbach.pte;
|
package de.schildbach.pte;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import de.schildbach.pte.dto.Location;
|
|
||||||
import de.schildbach.pte.dto.LocationType;
|
|
||||||
import de.schildbach.pte.dto.Style;
|
import de.schildbach.pte.dto.Style;
|
||||||
import de.schildbach.pte.dto.Style.Shape;
|
import de.schildbach.pte.dto.Style.Shape;
|
||||||
|
|
||||||
|
@ -57,12 +53,6 @@ public class VagfrProvider extends AbstractEfaProvider
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
|
||||||
{
|
|
||||||
return xmlStopfinderRequest(new Location(LocationType.STATION, 0, null, constraint.toString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String parseLine(final String mot, final String symbol, final String name, final String longName, final String trainType,
|
protected String parseLine(final String mot, final String symbol, final String name, final String longName, final String trainType,
|
||||||
final String trainNum, final String trainName)
|
final String trainNum, final String trainName)
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
|
|
||||||
package de.schildbach.pte.live;
|
package de.schildbach.pte.live;
|
||||||
|
|
||||||
|
import static org.hamcrest.CoreMatchers.hasItem;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertThat;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -77,6 +79,14 @@ public class VagfrProviderLiveTest extends AbstractProviderLiveTest
|
||||||
print(autocompletes);
|
print(autocompletes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void autocompleteCoverage() throws Exception
|
||||||
|
{
|
||||||
|
final List<Location> freiburgAutocompletes = provider.autocompleteStations("Betzenhauser Torplatz");
|
||||||
|
print(freiburgAutocompletes);
|
||||||
|
assertThat(freiburgAutocompletes, hasItem(new Location(LocationType.STATION, 6930503)));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shortTrip() throws Exception
|
public void shortTrip() throws Exception
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue