autocomplete by ajax-getstop where possible

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@591 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-05-01 12:56:01 +00:00
parent 758c24d0de
commit 82413fa953
6 changed files with 85 additions and 12 deletions

View file

@ -17,9 +17,12 @@
package de.schildbach.pte.live;
import java.util.List;
import org.junit.Test;
import de.schildbach.pte.SeptaProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.NearbyStationsResult;
import de.schildbach.pte.dto.QueryDeparturesResult;
@ -30,6 +33,22 @@ public class SeptaProviderLiveTest
{
private final SeptaProvider provider = new SeptaProvider();
@Test
public void autocomplete() throws Exception
{
final List<Location> autocompletes = provider.autocompleteStations("Airport");
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.VgsProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.NearbyStationsResult;
import de.schildbach.pte.dto.QueryDeparturesResult;
@ -30,6 +33,22 @@ public class VgsProviderLiveTest
{
private final VgsProvider provider = new VgsProvider();
@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
{