mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 12:49:49 +00:00
autocomplete for all efa based providers
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@245 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
b11faf1cd7
commit
b4bf75d875
10 changed files with 250 additions and 41 deletions
|
@ -16,9 +16,12 @@
|
|||
*/
|
||||
package de.schildbach.pte.live;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import de.schildbach.pte.VrrProvider;
|
||||
import de.schildbach.pte.dto.Autocomplete;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -29,6 +32,38 @@ public class VrrProviderLiveTest
|
|||
{
|
||||
private final VrrProvider provider = new VrrProvider();
|
||||
|
||||
@Test
|
||||
public void autocompleteIncomplete() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Kur");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteIdentified() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Düsseldorf, Am Frohnhof");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteCity() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Düsseldorf");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
private void list(final List<Autocomplete> autocompletes)
|
||||
{
|
||||
System.out.print(autocompletes.size() + " ");
|
||||
for (final Autocomplete autocomplete : autocompletes)
|
||||
System.out.print(autocomplete.toDebugString() + " ");
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStation() throws Exception
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue