mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 01:10:02 +00:00
rename Connection to Trip
This commit is contained in:
parent
fde90f7b87
commit
2852aedbd5
139 changed files with 1195 additions and 1236 deletions
|
@ -29,8 +29,8 @@ import de.schildbach.pte.dto.Location;
|
|||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.dto.QueryTripsResult;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
|
@ -83,65 +83,62 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void shortConnection() throws Exception
|
||||
public void shortTrip() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 80000793, "München", "Ostbahnhof"), null,
|
||||
new Location(LocationType.STATION, 80000799, "München", "Pasing"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, 80000793, "München", "Ostbahnhof"), null, new Location(
|
||||
LocationType.STATION, 80000799, "München", "Pasing"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void longConnection() throws Exception
|
||||
public void longTrip() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1005530, "Starnberg", "Arbeitsamt"), null,
|
||||
new Location(LocationType.STATION, 3001459, "Nürnberg", "Fallrohrstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, 1005530, "Starnberg", "Arbeitsamt"), null, new Location(
|
||||
LocationType.STATION, 3001459, "Nürnberg", "Fallrohrstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
// seems like there are no more connections all the time
|
||||
// seems like there are no more trips all the time
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenCoordinates() throws Exception
|
||||
public void tripBetweenCoordinates() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48165238, 11577473), null, new Location(
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.ADDRESS, 0, 48165238, 11577473), null, new Location(
|
||||
LocationType.ADDRESS, 0, 47987199, 11326532), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenCoordinateAndStation() throws Exception
|
||||
public void tripBetweenCoordinateAndStation() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48238341, 11478230), null, new Location(
|
||||
LocationType.ANY, 0, null, "Ostbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.ADDRESS, 0, 48238341, 11478230), null, new Location(LocationType.ANY, 0,
|
||||
null, "Ostbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenAddresses() throws Exception
|
||||
public void tripBetweenAddresses() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "München, Maximilianstr. 1"), null,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.ADDRESS, 0, null, "München, Maximilianstr. 1"), null, new Location(
|
||||
LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionBetweenStationAndAddress() throws Exception
|
||||
public void tripBetweenStationAndAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1220, null, "Josephsburg"), null, new Location(
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, 1220, null, "Josephsburg"), null, new Location(
|
||||
LocationType.ADDRESS, 0, 48188018, 11574239, null, "München Frankfurter Ring 35"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue