mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 16:40:30 +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
|
@ -18,12 +18,14 @@
|
|||
package de.schildbach.pte.live;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import de.schildbach.pte.LinzProvider;
|
||||
import de.schildbach.pte.NetworkProvider.LocationType;
|
||||
import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
||||
import de.schildbach.pte.dto.Autocomplete;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -35,6 +37,38 @@ public class LinzProviderLiveTest
|
|||
private LinzProvider provider = new LinzProvider();
|
||||
private static final String ALL_PRODUCTS = "IRSUTBFC";
|
||||
|
||||
@Test
|
||||
public void autocompleteIncomplete() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Linz, H");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteIdentified() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Leonding, Haag");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteCity() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Linz");
|
||||
|
||||
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 queryDepartures() throws Exception
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue