use correct timezone

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@536 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-03-26 13:46:26 +00:00
parent 2524ad72b3
commit acdec06e61
15 changed files with 417 additions and 351 deletions

View file

@ -17,10 +17,17 @@
package de.schildbach.pte.live;
import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.RmvProvider;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Connection;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyStationsResult;
import de.schildbach.pte.dto.QueryConnectionsResult;
import de.schildbach.pte.dto.QueryDeparturesResult;
/**
@ -29,6 +36,7 @@ import de.schildbach.pte.dto.QueryDeparturesResult;
public class RmvProviderLiveTest
{
private final RmvProvider provider = new RmvProvider();
protected static final String ALL_PRODUCTS = "IRSUTBFC";
@Test
public void nearbyStation() throws Exception
@ -45,4 +53,16 @@ public class RmvProviderLiveTest
System.out.println(result.stationDepartures);
}
@Test
public void shortConnection() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ANY, 0, null, "Hanau Hauptbahnhof!"), null,
new Location(LocationType.ANY, 0, null, "Frankfurt Hauptbahnhof!"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL);
System.out.println(result);
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
for (final Connection connection : result.connections)
provider.getConnectionDetails(connection.link);
System.out.println(moreResult);
}
}