Fix autocomplete coverage for Braunschweig.

This commit is contained in:
Andreas Schildbach 2014-02-10 09:36:42 +01:00
parent 9539b74cd6
commit 2dd83ef12e
2 changed files with 10 additions and 10 deletions

View file

@ -17,13 +17,9 @@
package de.schildbach.pte;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.Style;
/**
@ -56,12 +52,6 @@ public class BsvagProvider extends AbstractEfaProvider
return false;
}
@Override
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
{
return xmlStopfinderRequest(new Location(LocationType.STATION, 0, null, constraint.toString()));
}
private static final Map<String, Style> STYLES = new HashMap<String, Style>();
static

View file

@ -17,7 +17,9 @@
package de.schildbach.pte.live;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.Date;
@ -85,6 +87,14 @@ public class BsvagProviderLiveTest extends AbstractProviderLiveTest
print(autocompletes);
}
@Test
public void autocompleteCoverage() throws Exception
{
final List<Location> braunschweigAutocompletes = provider.autocompleteStations("Braunschweig Rhönweg");
print(braunschweigAutocompletes);
assertThat(braunschweigAutocompletes, hasItem(new Location(LocationType.STATION, 26000351)));
}
@Test
public void shortTrip() throws Exception
{