mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 05:48:46 +00:00
use format for building uri
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@443 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
8393f75f60
commit
e70bf5064d
2 changed files with 23 additions and 3 deletions
|
@ -17,9 +17,12 @@
|
|||
|
||||
package de.schildbach.pte.live;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import de.schildbach.pte.BvgProvider;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -30,10 +33,26 @@ public class BvgProviderLiveTest
|
|||
{
|
||||
private BvgProvider provider = new BvgProvider();
|
||||
|
||||
@Test
|
||||
public void autocompleteIncomplete() throws Exception
|
||||
{
|
||||
final List<Location> autocompletes = provider.autocompleteStations("nol");
|
||||
|
||||
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
|
||||
{
|
||||
final NearbyStationsResult result = provider.nearbyStations("9415052", 0, 0, 0, 0);
|
||||
final NearbyStationsResult result = provider.nearbyStations("9220302", 0, 0, 0, 0);
|
||||
System.out.println(result.stations.size() + " " + result.stations);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue