mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 16:59:51 +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
|
@ -31,6 +31,38 @@ public class GvhProviderLiveTest
|
|||
{
|
||||
private final GvhProvider provider = new GvhProvider();
|
||||
|
||||
@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("Hannover, Hannoversche Straße");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteCity() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Hannover");
|
||||
|
||||
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 autocomplete() throws Exception
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -16,9 +16,12 @@
|
|||
*/
|
||||
package de.schildbach.pte.live;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import de.schildbach.pte.VrnProvider;
|
||||
import de.schildbach.pte.dto.Autocomplete;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -29,6 +32,46 @@ public class VrnProviderLiveTest
|
|||
{
|
||||
private final VrnProvider provider = new VrnProvider();
|
||||
|
||||
@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("Bremen, KUR");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteLocality() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Bremen");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteCity() throws Exception
|
||||
{
|
||||
final List<Autocomplete> autocompletes = provider.autocompleteStations("Mannheim");
|
||||
|
||||
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
|
||||
{
|
||||
|
|
|
@ -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