autocomplete whereever possible

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@599 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-05-04 10:29:39 +00:00
parent 7223f80dc0
commit 2087a04b3d
18 changed files with 76 additions and 43 deletions

View file

@ -17,9 +17,12 @@
package de.schildbach.pte.live;
import java.util.List;
import org.junit.Test;
import de.schildbach.pte.InvgProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.NearbyStationsResult;
import de.schildbach.pte.dto.QueryDeparturesResult;
@ -30,6 +33,22 @@ public class InvgProviderLiveTest
{
private final InvgProvider provider = new InvgProvider();
@Test
public void autocomplete() throws Exception
{
final List<Location> autocompletes = provider.autocompleteStations("Flughafen");
list(autocompletes);
}
private void list(final List<Location> autocompletes)
{
System.out.print(autocompletes.size() + " ");
for (final Location autocomplete : autocompletes)
System.out.print(autocomplete.toDebugString() + " ");
System.out.println();
}
@Test
public void nearbyStation() throws Exception
{

View file

@ -17,9 +17,12 @@
package de.schildbach.pte.live;
import java.util.List;
import org.junit.Test;
import de.schildbach.pte.NasaProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.NearbyStationsResult;
import de.schildbach.pte.dto.QueryDeparturesResult;
@ -30,6 +33,22 @@ public class NasaProviderLiveTest
{
private final NasaProvider provider = new NasaProvider();
@Test
public void autocomplete() throws Exception
{
final List<Location> autocompletes = provider.autocompleteStations("Flughafen");
list(autocompletes);
}
private void list(final List<Location> autocompletes)
{
System.out.print(autocompletes.size() + " ");
for (final Location autocomplete : autocompletes)
System.out.print(autocomplete.toDebugString() + " ");
System.out.println();
}
@Test
public void nearbyStation() throws Exception
{

View file

@ -18,6 +18,7 @@
package de.schildbach.pte.live;
import java.util.Date;
import java.util.List;
import org.junit.Test;
@ -38,6 +39,22 @@ public class RmvProviderLiveTest
private final RmvProvider provider = new RmvProvider();
protected static final String ALL_PRODUCTS = "IRSUTBFC";
@Test
public void autocomplete() throws Exception
{
final List<Location> autocompletes = provider.autocompleteStations("Flughafen");
list(autocompletes);
}
private void list(final List<Location> autocompletes)
{
System.out.print(autocompletes.size() + " ");
for (final Location autocomplete : autocompletes)
System.out.print(autocomplete.toDebugString() + " ");
System.out.println();
}
@Test
public void nearbyStation() throws Exception
{