AbstractProviderLiveTest: Use TripOptions in queryTrips() and simplify live tests by passing null to use defaults where appropriate.

This commit is contained in:
Andreas Schildbach 2018-11-05 16:49:30 +01:00
parent 79ff93b80f
commit 0831d0f8e6
63 changed files with 291 additions and 579 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -39,6 +39,7 @@ import de.schildbach.pte.dto.QueryTripsContext;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.StationDepartures;
import de.schildbach.pte.dto.SuggestLocationsResult;
import de.schildbach.pte.dto.TripOptions;
/**
* @author Antonio El Khoury
@ -169,7 +170,7 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
assertTrue(toResult.getLocations().size() > 0);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null,
toResult.getLocations().get(0), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
toResult.getLocations().get(0), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);
}
@ -180,9 +181,10 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
final SuggestLocationsResult toResult = suggestLocations(to);
assertTrue(toResult.getLocations().size() > 0);
final TripOptions options = new TripOptions(EnumSet.noneOf(Product.class), null, WalkSpeed.NORMAL,
Accessibility.NEUTRAL, null);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null,
toResult.getLocations().get(0), new Date(), true, EnumSet.noneOf(Product.class), WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
toResult.getLocations().get(0), new Date(), true, options);
assertEquals(QueryTripsResult.Status.NO_TRIPS, result.status);
print(result);
}
@ -192,7 +194,7 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
assertTrue(toResult.getLocations().size() > 0);
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "stop_area:RTP:SA:999999"), null,
toResult.getLocations().get(0), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
toResult.getLocations().get(0), new Date(), true, null);
assertEquals(QueryTripsResult.Status.UNKNOWN_FROM, result.status);
print(result);
}
@ -202,8 +204,7 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
assertTrue(fromResult.getLocations().size() > 0);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null,
new Location(LocationType.STATION, "stop_area:RTP:SA:999999"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "stop_area:RTP:SA:999999"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.UNKNOWN_TO, result.status);
print(result);
}
@ -212,8 +213,7 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
final SuggestLocationsResult toResult = suggestLocations(to);
assertTrue(toResult.getLocations().size() > 0);
final QueryTripsResult result = queryTrips(from, null, toResult.getLocations().get(0), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
final QueryTripsResult result = queryTrips(from, null, toResult.getLocations().get(0), new Date(), true, null);
assertEquals(QueryTripsResult.Status.AMBIGUOUS, result.status);
assertTrue(result.ambiguousFrom != null);
assertTrue(result.ambiguousFrom.size() > 0);
@ -224,8 +224,7 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
final SuggestLocationsResult fromResult = suggestLocations(from);
assertTrue(fromResult.getLocations().size() > 0);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null, to, new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null, to, new Date(), true, null);
assertEquals(QueryTripsResult.Status.AMBIGUOUS, result.status);
assertTrue(result.ambiguousTo != null);
assertTrue(result.ambiguousTo.size() > 0);
@ -238,8 +237,9 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
final SuggestLocationsResult toResult = suggestLocations(to);
assertTrue(toResult.getLocations().size() > 0);
final TripOptions options = new TripOptions(Product.ALL, null, WalkSpeed.SLOW, Accessibility.NEUTRAL, null);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null,
toResult.getLocations().get(0), new Date(), true, Product.ALL, WalkSpeed.SLOW, Accessibility.NEUTRAL);
toResult.getLocations().get(0), new Date(), true, options);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);
}
@ -250,8 +250,9 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
final SuggestLocationsResult toResult = suggestLocations(to);
assertTrue(toResult.getLocations().size() > 0);
final TripOptions options = new TripOptions(Product.ALL, null, WalkSpeed.FAST, Accessibility.NEUTRAL, null);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null,
toResult.getLocations().get(0), new Date(), true, Product.ALL, WalkSpeed.FAST, Accessibility.NEUTRAL);
toResult.getLocations().get(0), new Date(), true, options);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);
}
@ -269,8 +270,7 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
assertEquals(toLocation.type, LocationType.POI);
print(toResult);
final QueryTripsResult tripsResult = queryTrips(fromLocation, null, toLocation, new Date(), true, Product.ALL,
NetworkProvider.WalkSpeed.NORMAL, NetworkProvider.Accessibility.NEUTRAL);
final QueryTripsResult tripsResult = queryTrips(fromLocation, null, toLocation, new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, tripsResult.status);
print(tripsResult);
}
@ -282,7 +282,7 @@ public abstract class AbstractNavitiaProviderLiveTest extends AbstractProviderLi
assertTrue(toResult.getLocations().size() > 0);
final QueryTripsResult result = queryTrips(fromResult.getLocations().get(0), null,
toResult.getLocations().get(0), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
toResult.getLocations().get(0), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
final QueryTripsContext context = result.context;

View file

@ -24,17 +24,13 @@ import java.io.InputStream;
import java.util.Date;
import java.util.EnumSet;
import java.util.Properties;
import java.util.Set;
import javax.annotation.Nullable;
import de.schildbach.pte.NetworkProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsContext;
import de.schildbach.pte.dto.QueryTripsResult;
@ -122,10 +118,8 @@ public abstract class AbstractProviderLiveTest {
}
protected final QueryTripsResult queryTrips(final Location from, final @Nullable Location via, final Location to,
final Date date, final boolean dep, final @Nullable Set<Product> products,
final @Nullable WalkSpeed walkSpeed, final @Nullable Accessibility accessibility) throws IOException {
return provider.queryTrips(from, via, to, date, dep,
new TripOptions(products, null, walkSpeed, accessibility, null));
final Date date, final boolean dep, final @Nullable TripOptions options) throws IOException {
return provider.queryTrips(from, via, to, date, dep, options);
}
protected final QueryTripsResult queryMoreTrips(final QueryTripsContext context, final boolean later)

View file

@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -258,7 +258,7 @@ public class AustraliaProviderLiveTest extends AbstractNavitiaProviderLiveTest {
private void assertJourneyExists(String network, String[] eligibleLines, Location from, Location to)
throws IOException {
QueryTripsResult trips = queryTrips(from, null, to, getNextMondayMorning(), true, null, null, null);
QueryTripsResult trips = queryTrips(from, null, to, getNextMondayMorning(), true, null);
assertNull(trips.ambiguousFrom);
assertNull(trips.ambiguousTo);
assertEquals(QueryTripsResult.Status.OK, trips.status);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,12 +27,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.AvvProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -83,8 +80,7 @@ public class AvvProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "101", null, "Königsplatz"), null,
new Location(LocationType.STATION, "100", null, "Hauptbahnhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "100", null, "Hauptbahnhof"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -36,6 +36,7 @@ import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
import de.schildbach.pte.dto.TripOptions;
/**
* @author Andreas Schildbach
@ -109,8 +110,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8011160", null, "Berlin Hbf"),
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -126,10 +126,9 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest {
public void slowTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "732655", 52535576, 13422171, null, "Marienburger Str., Berlin"),
null,
new Location(LocationType.STATION, "623234", 48000221, 11342490, null,
null, new Location(LocationType.STATION, "623234", 48000221, 11342490, null,
"Tutzinger-Hof-Platz, Starnberg"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -143,8 +142,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest {
public void noTrips() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "513729", null, "Schillerplatz, Kaiserslautern"), null,
new Location(LocationType.STATION, "403631", null, "Trippstadt Grundschule"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "403631", null, "Trippstadt Grundschule"), new Date(), true, null);
print(result);
}
@ -153,10 +151,9 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 52517139, 13388749, null,
"Berlin - Mitte, Unter den Linden 24"),
null,
new Location(LocationType.ADDRESS, null, 47994243, 11338543, null,
null, new Location(LocationType.ADDRESS, null, 47994243, 11338543, null,
"Starnberg, Possenhofener Straße 13"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -168,9 +165,10 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripsAcrossBorder() throws Exception {
final TripOptions options = new TripOptions(EnumSet.of(Product.BUS), null, WalkSpeed.NORMAL,
Accessibility.NEUTRAL, null);
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8506131", null, "Kreuzlingen"),
null, new Location(LocationType.STATION, "8003400", null, "Konstanz"), new Date(), true,
EnumSet.of(Product.BUS), WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "8003400", null, "Konstanz"), new Date(), true, options);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}
@ -178,16 +176,14 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripsByCoordinate() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(52535576, 13422171), null,
Location.coord(52525589, 13369548), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(52525589, 13369548), new Date(), true, null);
print(result);
}
@Test
public void tripsTooClose() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"),
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.TOO_CLOSE, result.status);
}
@ -195,8 +191,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripsInvalidDate() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8011160", null, "Berlin Hbf"),
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(0), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(0), true, null);
print(result);
assertEquals(QueryTripsResult.Status.INVALID_DATE, result.status);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -28,12 +28,9 @@ import java.util.EnumSet;
import org.junit.Test;
import de.schildbach.pte.BayernProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -114,8 +111,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
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);
new Location(LocationType.STATION, "80000799", "München", "Pasing"), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -129,8 +125,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
public void longTrip() throws Exception {
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);
new Location(LocationType.STATION, "3001459", "Nürnberg", "Fallrohrstraße"), new Date(), true, null);
print(result);
// seems like there are no more trips all the time
}
@ -138,8 +133,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(48165238, 11577473), null,
Location.coord(47987199, 11326532), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(47987199, 11326532), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -152,8 +146,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenCoordinateAndStation() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ADDRESS, null, 48238341, 11478230), null,
new Location(LocationType.STATION, "80000793", "München", "Ostbahnhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "80000793", "München", "Ostbahnhof"), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -167,8 +160,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
public void tripBetweenAddresses() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, null, "München, Maximilianstr. 1"), null,
new Location(LocationType.ADDRESS, null, null, "Starnberg, Jahnstraße 50"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ADDRESS, null, null, "Starnberg, Jahnstraße 50"), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -182,7 +174,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
public void tripBetweenStationAndAddress() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "1001220", null, "Josephsburg"),
null, new Location(LocationType.ADDRESS, null, 48188018, 11574239, null, "München Frankfurter Ring 35"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -197,7 +189,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.POI, null, 47710568, 12621970, null, "Ruhpolding, Seehaus"), null,
new Location(LocationType.POI, null, 47738372, 12630996, null, "Ruhpolding, Unternberg-Bahn"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -211,8 +203,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest {
public void tripRegensburg() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "4014051", "Regensburg", "Klenzestraße"), null,
new Location(LocationType.STATION, "4014080", "Regensburg", "Universität"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "4014080", "Regensburg", "Universität"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,12 +27,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.BsvagProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -86,8 +83,7 @@ public class BsvagProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "26000178", null, "Hauptbahnhof"),
null, new Location(LocationType.STATION, "26000322", null, "Packhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "26000322", null, "Packhof"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,12 +26,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.BvgProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -120,8 +117,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"), null,
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -138,7 +134,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "900055101", 52496176, 13343273, null, "U Viktoria-Luise-Platz"),
null, new Location(LocationType.STATION, "900089303", 52588810, 13288699, null, "S Tegel"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
}
@ -147,8 +143,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"),
new Location(LocationType.STATION, "900044202", "Berlin", "Bundesplatz"),
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -157,8 +152,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(52501507, 13357026), null,
Location.coord(52513639, 13568648), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(52513639, 13568648), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -169,10 +163,9 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 52536099, 13426309, null,
"Christburger Straße 1, 10405 Berlin, Deutschland"),
null,
new Location(LocationType.ADDRESS, null, 52486400, 13350744, null,
null, new Location(LocationType.ADDRESS, null, 52486400, 13350744, null,
"Eisenacher Straße 70, 10823 Berlin, Deutschland"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -181,8 +174,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void viaTripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(52501507, 13357026),
Location.coord(52479868, 13324247), Location.coord(52513639, 13568648), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
Location.coord(52479868, 13324247), Location.coord(52513639, 13568648), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -195,7 +187,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
"Weimarische Str. 7"),
null, new Location(LocationType.ADDRESS, null, 52541536, 13421290, "10437 Berlin-Prenzlauer Berg",
"Göhrener Str. 5"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -209,7 +201,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.ADDRESS, null, 52527872, 13381657, "10115 Berlin-Mitte",
"Hannoversche Str. 20"),
new Location(LocationType.ADDRESS, null, 52526029, 13399878, "10178 Berlin-Mitte", "Sophienstr. 24"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -222,7 +214,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
"Bayernring, 12101 Berlin, Deutschland"),
null,
new Location(LocationType.STATION, "900064301", 52429099, 13328081, null, "S Lichterfelde Ost Bhf"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
}
}

View file

@ -27,11 +27,9 @@ import java.util.EnumSet;
import org.junit.Test;
import de.schildbach.pte.CmtaProvider;
import de.schildbach.pte.NetworkProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -91,8 +89,7 @@ public class CmtaProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "591", null, "Capitol Station (NB)"), null,
new Location(LocationType.STATION, "5940", null, "Lavaca/17th (Midblock)"), new Date(), true,
Product.ALL, NetworkProvider.WalkSpeed.NORMAL, NetworkProvider.Accessibility.NEUTRAL);
new Location(LocationType.STATION, "5940", null, "Lavaca/17th (Midblock)"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);
@ -106,8 +103,7 @@ public class CmtaProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void addressTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ADDRESS, null, null, "1501 Colorado St"),
null, new Location(LocationType.ADDRESS, null, null, "4299 Duval St"), new Date(), true, Product.ALL,
NetworkProvider.WalkSpeed.NORMAL, NetworkProvider.Accessibility.NEUTRAL);
null, new Location(LocationType.ADDRESS, null, null, "4299 Duval St"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,12 +27,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.DingProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -90,8 +87,7 @@ public class DingProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "9001011", "Ulm", "Justizgebäude"), null,
new Location(LocationType.STATION, "9001010", "Ulm", "Theater"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "9001010", "Ulm", "Theater"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -118,8 +114,7 @@ public class DingProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripAnyToAny() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Hermaringen"), null,
new Location(LocationType.ANY, null, null, "Heidenheim"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Heidenheim"), new Date(), true, null);
print(result);
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,12 +24,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.DsbProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -76,8 +73,7 @@ public class DsbProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "900000011", null, "Copenhagen Airport"), null,
new Location(LocationType.POI, "551922500", null, "Billund Airport"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.POI, "551922500", null, "Billund Airport"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,12 +25,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.DubProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -64,8 +61,7 @@ public class DubProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "3505565", null, "Airport Terminal 1, Arrival"), null,
new Location(LocationType.STATION, "3505445", null, "Airport Terminal 3"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "3505445", null, "Airport Terminal 3"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,12 +24,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.EireannProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -89,7 +86,7 @@ public class EireannProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8052281", null, "Dublin Rd (GMIT)"), null,
new Location(LocationType.STATION, "8013100", null, "Dublin Airport (Atrium Road)"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,12 +27,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.GvhProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -104,8 +101,7 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void incompleteTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "hann"), null,
new Location(LocationType.ANY, null, null, "laat"), new Date(), true, Product.ALL, WalkSpeed.FAST,
Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "laat"), new Date(), true, null);
print(result);
}
@ -114,7 +110,7 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "25000031", null, "Hannover Hauptbahnhof"), null,
new Location(LocationType.STATION, "25001141", null, "Hannover Bismarckstraße"), new Date(), true,
Product.ALL, WalkSpeed.FAST, Accessibility.NEUTRAL);
null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -143,7 +139,7 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ANY, null, 53069619, 8799202, null, "bremen, neustadtswall 12"), null,
new Location(LocationType.ADDRESS, null, 53104124, 8788575, null, "Bremen Glücksburger Straße 37"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -154,10 +150,9 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 53622859, 10133545, null,
"Zamenhofweg 14, 22159 Hamburg, Deutschland"),
null,
new Location(LocationType.ADDRESS, null, 53734260, 9674990, null,
null, new Location(LocationType.ADDRESS, null, 53734260, 9674990, null,
"Lehmkuhlen 5, 25337 Elmshorn, Deutschland"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,12 +26,9 @@ import java.util.List;
import org.junit.Test;
import de.schildbach.pte.HslProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -105,8 +102,7 @@ public class HslProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, null, "", "Gustaf Hällströmin katu 1"), null,
new Location(LocationType.STATION, null, "", "Tyynenmerenkatu 11"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, null, "", "Tyynenmerenkatu 11"), new Date(), true, null);
print(result);
assertTimesInSequence(result.trips);

View file

@ -24,12 +24,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.InvgProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -76,8 +73,7 @@ public class InvgProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final Location from = new Location(LocationType.STATION, "60706", null, "Rathausplatz");
final Location to = new Location(LocationType.STATION, "146704", null, "Hochschule");
final QueryTripsResult result = queryTrips(from, null, to, new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
final QueryTripsResult result = queryTrips(from, null, to, new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -87,8 +83,7 @@ public class InvgProviderLiveTest extends AbstractProviderLiveTest {
public void tripBetweenCoordinates() throws Exception {
final Location from = Location.coord(48744414, 11434603); // Ingolstadt Hbf
final Location to = Location.coord(48751558, 11426546); // Ingolstadt Nordbahnhof
final QueryTripsResult result = queryTrips(from, null, to, new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
final QueryTripsResult result = queryTrips(from, null, to, new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,12 +27,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.KvvProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -88,7 +85,7 @@ public class KvvProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.STATION, "7000001", 49009526, 8404914, "Karlsruhe", "Marktplatz"), null,
new Location(LocationType.STATION, "7000002", 49009393, 8408866, "Karlsruhe",
"Kronenplatz (Kaiserstr.)"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -117,10 +114,9 @@ public class KvvProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 48985089, 8402709, null,
"Konstanzer Straße 17, 76199 Karlsruhe, Deutschland"),
null,
new Location(LocationType.ADDRESS, null, 49007706, 8356358, null,
null, new Location(LocationType.ADDRESS, null, 49007706, 8356358, null,
"Durmersheimer Straße 6, 76185 Karlsruhe, Deutschland"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,12 +25,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.LinzProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -88,16 +85,14 @@ public class LinzProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void incompleteTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "linz"), null,
new Location(LocationType.ANY, null, null, "gel"), new Date(), true, Product.ALL, WalkSpeed.FAST,
Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "gel"), new Date(), true, null);
print(result);
}
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, null, null, "Linz Hauptbahnhof"),
null, new Location(LocationType.STATION, null, null, "Linz Auwiesen"), new Date(), true, Product.ALL,
WalkSpeed.FAST, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, null, null, "Linz Auwiesen"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -124,8 +119,7 @@ public class LinzProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void longTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, null, null, "Linz Auwiesen"),
null, new Location(LocationType.STATION, null, null, "Linz Hafen"), new Date(), true, Product.ALL,
WalkSpeed.SLOW, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, null, null, "Linz Hafen"), new Date(), true, null);
print(result);
// final QueryTripsResult laterResult = queryMoreTrips(provider, result.context, true);
// print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,12 +24,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.LuProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -76,8 +73,7 @@ public class LuProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "200416001", null, "Cité Aéroport"), null,
new Location(LocationType.STATION, "200405035", "Luxembourg", "Gare Centrale"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "200405035", "Luxembourg", "Gare Centrale"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -87,8 +83,7 @@ public class LuProviderLiveTest extends AbstractProviderLiveTest {
public void addressTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 49611610, 6130265, null, "Luxembourg, Rue Génistre 2"), null,
new Location(LocationType.STATION, "200405035", "Luxembourg", "Gare Centrale"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "200405035", "Luxembourg", "Gare Centrale"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,12 +26,9 @@ import java.util.EnumSet;
import org.junit.Test;
import de.schildbach.pte.MerseyProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -87,7 +84,7 @@ public class MerseyProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "4017846", 53401672, -2958720, "Liverpool", "Orphan Street"), null,
new Location(LocationType.STATION, "4027286", 53397324, -2961676, "Liverpool", "Womens Hospital"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,12 +27,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.MvgProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -98,8 +95,7 @@ public class MvgProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "24200200", null, "Lüd., Christuskirche"), null,
new Location(LocationType.STATION, "24200032", null, "Lüd., Friedrichstr."), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "24200032", null, "Lüd., Friedrichstr."), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -28,12 +28,9 @@ import java.util.EnumSet;
import org.junit.Test;
import de.schildbach.pte.MvvProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -117,8 +114,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "2", "München", "Marienplatz"),
null, new Location(LocationType.STATION, "10", "München", "Pasing"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "10", "München", "Pasing"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -130,16 +126,14 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest {
public void longTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "1005530", 48002924, 11340144, "Starnberg", "Agentur für Arbeit"),
null, new Location(LocationType.STATION, null, null, "Ackermannstraße"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, null, null, "Ackermannstraße"), new Date(), true, null);
print(result);
}
@Test
public void tripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(48165238, 11577473), null,
Location.coord(47987199, 11326532), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(47987199, 11326532), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -148,8 +142,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenCoordinateAndStation() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ADDRESS, null, 48238341, 11478230), null,
new Location(LocationType.ANY, null, null, "Ostbahnhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Ostbahnhof"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -159,8 +152,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest {
public void tripBetweenAddresses() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, null, "München, Maximilianstr. 1"), null,
new Location(LocationType.ADDRESS, null, null, "Starnberg, Jahnstraße 50"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ADDRESS, null, null, "Starnberg, Jahnstraße 50"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -170,7 +162,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest {
public void tripBetweenStationAndAddress() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "1220", null, "Josephsburg"),
null, new Location(LocationType.ADDRESS, null, 48188018, 11574239, null, "München Frankfurter Ring 35"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -179,14 +171,12 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void queryTripInvalidStation() throws Exception {
final QueryTripsResult result1 = queryTrips(new Location(LocationType.STATION, "2", "München", "Marienplatz"),
null, new Location(LocationType.STATION, "99999", 0, 0, null, null), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "99999", 0, 0, null, null), new Date(), true, null);
assertEquals(QueryTripsResult.Status.UNKNOWN_TO, result1.status);
final QueryTripsResult result2 = queryTrips(new Location(LocationType.STATION, "99999", 0, 0, null, null), null,
new Location(LocationType.STATION, "2", "München", "Marienplatz"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "2", "München", "Marienplatz"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.UNKNOWN_FROM, result2.status);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,12 +25,9 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NasaProvider;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -93,8 +90,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "11063", null, "Leipzig, Johannisplatz"), null,
new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);
@ -110,7 +106,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8010205", 51346546, 12383333, null, "Leipzig Hbf"), null,
new Location(LocationType.STATION, "8012183", 51423340, 12223423, null, "Leipzig/Halle Flughafen"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);
@ -126,16 +122,14 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "13002", null, "Leipzig, Augustusplatz"), null,
new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"),
Iso8601Format.newDateFormat().parse("2011-01-01"), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Iso8601Format.newDateFormat().parse("2011-01-01"), true, null);
assertEquals(QueryTripsResult.Status.INVALID_DATE, result.status);
}
@Test
public void ambiguousTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Platz"), null,
new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.AMBIGUOUS, result.status);
print(result);
}
@ -143,8 +137,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void sameStationTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"),
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.TOO_CLOSE, result.status);
}
@ -153,8 +146,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 51334078, 12478331, "04319 Leipzig-Engelsdorf",
"August-Bebel-Platz"),
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "8010205", null, "Leipzig Hbf"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
print(result);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,7 +27,6 @@ import java.util.EnumSet;
import org.junit.Test;
import de.schildbach.pte.NegentweeProvider;
import de.schildbach.pte.NetworkProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
@ -134,7 +133,7 @@ public class NegentweeProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "station-amsterdam-centraal", null, "Amsterdam Centraal"), null,
new Location(LocationType.STATION, "station-amsterdam-zuid", null, "Amsterdam Zuid"), new Date(), true,
null, NetworkProvider.WalkSpeed.FAST, NetworkProvider.Accessibility.NEUTRAL);
null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}
@ -144,7 +143,7 @@ public class NegentweeProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result1 = queryTrips(
new Location(LocationType.STATION, "station-amsterdam-centraal", null, "Amsterdam Centraal"), null,
new Location(LocationType.STATION, "station-rotterdam-centraal", null, "Rotterdam Centraal"),
new Date(), true, null, NetworkProvider.WalkSpeed.FAST, NetworkProvider.Accessibility.NEUTRAL);
new Date(), true, null);
print(result1);
assertEquals(QueryTripsResult.Status.OK, result1.status);
@ -160,8 +159,7 @@ public class NegentweeProviderLiveTest extends AbstractProviderLiveTest {
public void ambiguousTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Amsterdam Zuid"),
new Location(LocationType.STATION, "station-amsterdam-centraal", null, "Amsterdam Centraal"),
new Location(LocationType.ANY, null, null, "Rotterdam Centraal"), new Date(), true, null,
NetworkProvider.WalkSpeed.FAST, NetworkProvider.Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Rotterdam Centraal"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.AMBIGUOUS, result.status);
}
@ -172,7 +170,7 @@ public class NegentweeProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.ADDRESS, "amsterdam/prins-hendrikkade-80e", null, "Prins Hendrikkade"), null,
new Location(LocationType.STATION, "breda/bushalte-cornelis-florisstraat", null,
"Cornelis Florisstraat"),
new Date(), true, null, NetworkProvider.WalkSpeed.FAST, NetworkProvider.Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}
@ -181,8 +179,7 @@ public class NegentweeProviderLiveTest extends AbstractProviderLiveTest {
public void coordinatesTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.COORD, null, new Point(51677273, 4437548)),
new Location(LocationType.COORD, null, new Point(52162772, 4583171)),
new Location(LocationType.COORD, null, new Point(53347140, 6720583)), new Date(), true, null,
NetworkProvider.WalkSpeed.FAST, NetworkProvider.Accessibility.NEUTRAL);
new Location(LocationType.COORD, null, new Point(53347140, 6720583)), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +23,6 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.NsProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
@ -81,8 +79,7 @@ public class NsProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8400058", null, "Amsterdam Centraal"), null,
new Location(LocationType.STATION, "8400061", null, "Amsterdam Zuid"), new Date(), true, null,
WalkSpeed.FAST, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8400061", null, "Amsterdam Zuid"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.NvbwProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -114,8 +111,7 @@ public class NvbwProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "17002402", null, "Bahnhof"),
null, new Location(LocationType.STATION, "17009001", null, "Bahnhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "17009001", null, "Bahnhof"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -144,7 +140,7 @@ public class NvbwProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8029333", 48492484, 9207456, "Reutlingen", "ZOB"), null,
new Location(LocationType.STATION, "8029109", 48496968, 9213320, "Reutlingen", "Bismarckstr."),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -172,10 +168,9 @@ public class NvbwProviderLiveTest extends AbstractProviderLiveTest {
public void trip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "6900037", 48063184, 7779532, "Buchheim (Breisgau)", "Fortuna"),
null,
new Location(LocationType.STATION, "6906508", 47996616, 7840450, "Freiburg im Breisgau",
null, new Location(LocationType.STATION, "6906508", 47996616, 7840450, "Freiburg im Breisgau",
"Freiburg im Breisgau, Hauptbahnhof"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}
@ -183,8 +178,7 @@ public class NvbwProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripPforzheimToKarlsruhe() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "7900050"), null,
new Location(LocationType.STATION, "7000090"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "7000090"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -35,6 +35,7 @@ import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
import de.schildbach.pte.dto.TripOptions;
/**
* @author Andreas Schildbach
@ -109,9 +110,9 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "3000001", null, "Hauptwache"),
null, new Location(LocationType.STATION, "3000912", null, "Südbahnhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "3000912", null, "Südbahnhof"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -182,7 +183,7 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "2200007", null, "Kassel Wilhelmshöhe"), null,
new Location(LocationType.STATION, "2200278", null, "Kassel Wilhelmshöher Weg"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -190,10 +191,12 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void slowTrip() throws Exception {
final TripOptions options = new TripOptions(Product.ALL, null, WalkSpeed.NORMAL, Accessibility.BARRIER_FREE,
null);
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "3029079", 50017679, 8229480, "Mainz", "An den Dünen"), null,
new Location(LocationType.STATION, "3013508", 50142890, 8895203, "Hanau", "Beethovenplatz"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.BARRIER_FREE);
true, options);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -209,8 +212,7 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripByName() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ANY, null, null, "Frankfurt Bockenheimer Warte!"), null,
new Location(LocationType.ANY, null, null, "Frankfurt Hauptbahnhof!"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Frankfurt Hauptbahnhof!"), new Date(), true, null);
print(result);
}
@ -221,7 +223,7 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest {
"Hegelstrasse, 60316 Frankfurt am Main"),
null,
new Location(LocationType.ADDRESS, null, 50100364, 8615193, null, "Mainzer Landstrasse, Frankfurt"),
new Date(1378368840000l), true, Product.ALL, null, null);
new Date(1378368840000l), true, null);
print(result);
if (!result.context.canQueryLater())
@ -236,7 +238,7 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "3000909", 50094052, 8690923, null, "F Brauerei"), null,
new Location(LocationType.STATION, "3001201", 50119950, 8653924, null, "F Bockenheimer Warte"),
new Date(1378368840000l), true, Product.ALL, null, null);
new Date(1378368840000l), true, null);
print(result);
if (!result.context.canQueryLater())

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.OebbProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -93,8 +90,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "1140101", null, "Linz"), null,
new Location(LocationType.STATION, "1190100", null, "Wien"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "1190100", null, "Wien"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -105,8 +101,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void slowTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Ramsen Zoll!"), null,
new Location(LocationType.ANY, null, null, "Azuga!"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Azuga!"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -117,8 +112,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripWithFootway() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Graz, Haselweg!"), null,
new Location(LocationType.ANY, null, null, "Innsbruck, Gumppstraße 69!"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Innsbruck, Gumppstraße 69!"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -131,7 +125,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ANY, null, null, "Wien, Krottenbachstraße 110!"), null,
new Location(LocationType.ADDRESS, null, null, "Wien, Meidlinger Hauptstraße 1!"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.OoevvProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -112,8 +109,7 @@ public class OoevvProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripFeldkirch() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "480082200", null, "Feldkirch Katzenturm"), null,
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -130,8 +126,7 @@ public class OoevvProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripWien() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "490132000", null, "Wien Stephansplatz"), null,
new Location(LocationType.STATION, "490024500", null, "Wien Stubentor"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "490024500", null, "Wien Stubentor"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -149,7 +144,7 @@ public class OoevvProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "455000900", 47808976, 13056409, "Salzburg", "Vogelweiderstraße"),
null, new Location(LocationType.STATION, "455084400", 47811556, 13050278, "Salzburg", "Merianstraße"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -180,15 +175,14 @@ public class OoevvProviderLiveTest extends AbstractProviderLiveTest {
"A=2@O=6800 Feldkirch, Kapfweg 6@X=9585539@Y=47239257@U=103@L=980092305@B=1@p=1437727591@",
"6800 Feldkirch", "Kapfweg 6"),
null, new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
}
@Test
public void tripCoordinateToStation() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(47238096, 9585581), null,
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true, null);
print(result);
}
}

View file

@ -23,13 +23,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.PlProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -81,8 +78,7 @@ public class PlProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "5196001", null, "KRAKÓW"), null,
new Location(LocationType.STATION, "5196003", null, "WARSZAWA"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "5196003", null, "WARSZAWA"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,13 +23,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.RtProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -89,7 +86,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8503000", null, "Zürich HB"),
null, new Location(LocationType.STATION, "8507785", null, "Bern, Hauptbahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -99,8 +96,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest {
public void slowTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ANY, null, null, "Schocherswil, Alte Post!"), null,
new Location(LocationType.ANY, null, null, "Laconnex, Mollach"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Laconnex, Mollach"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -110,8 +106,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest {
public void tripWithFootway() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, null, "Spiez, Seestraße 62"), null,
new Location(LocationType.ADDRESS, null, null, "Einsiedeln, Erlenmoosweg 24"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ADDRESS, null, null, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -123,7 +118,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.ADDRESS, null, 51521886, -51447, null,
"26 Coopers Close, Poplar, Greater London E1 4, Vereinigtes Königreich"),
null, new Location(LocationType.STATION, "8096022", 50941312, 6967206, null, "COLOGNE"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -133,8 +128,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest {
public void viaTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8400056", null, "Amsterdam RAI"),
new Location(LocationType.STATION, "8400058", null, "Amsterdam Centraal"),
new Location(LocationType.STATION, "8000085", null, "Düsseldorf Hbf"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8000085", null, "Düsseldorf Hbf"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -143,8 +137,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void crossStateTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8000207", null, "Köln Hbf"),
null, new Location(LocationType.STATION, "6096001", null, "DUBLIN"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "6096001", null, "DUBLIN"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.RtaChicagoProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -70,8 +67,7 @@ public class RtaChicagoProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "10101442"), null,
new Location(LocationType.STATION, "10101111"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "10101111"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,13 +23,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.SbbProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -88,7 +85,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8503000", null, "Zürich HB"),
null, new Location(LocationType.STATION, "8507785", null, "Bern, Hauptbahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -98,8 +95,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest {
public void slowTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8587210", null, "Schocherswil, Alte Post"), null,
new Location(LocationType.STATION, "8592972", null, "Laconnex, Mollach"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8592972", null, "Laconnex, Mollach"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -110,7 +106,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 46689354, 7683444, null, "Spiez, Seestraße 62"), null,
new Location(LocationType.ADDRESS, null, 47133169, 8767425, null, "Einsiedeln, Erlenmoosweg 24"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -120,8 +116,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest {
public void tripFromAddress() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 47438595, 8437369, null, "Dorfstrasse 10, Dällikon, Schweiz"),
null, new Location(LocationType.STATION, "8500010", null, "Basel"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "8500010", null, "Basel"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,13 +25,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.SeProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -91,8 +88,7 @@ public class SeProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "740014867", null, "Luleå Airport"), null,
new Location(LocationType.STATION, "740098000", null, "STOCKHOLM"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "740098000", null, "STOCKHOLM"), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -106,7 +102,7 @@ public class SeProviderLiveTest extends AbstractProviderLiveTest {
public void shortStockholmTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "740098000", null, "STOCKHOLM"),
null, new Location(LocationType.STATION, "740020101", "Stockholm", "Slussen T-bana"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
if (!result.context.canQueryLater())
@ -120,8 +116,7 @@ public class SeProviderLiveTest extends AbstractProviderLiveTest {
public void longTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "740098086", 67859847, 20212802, null, "KIRUNA"), null,
new Location(LocationType.STATION, "740098000", null, "STOCKHOLM"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "740098000", null, "STOCKHOLM"), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.ShProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -96,8 +93,7 @@ public class ShProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8002547", null, "Flughafen Hamburg"), null,
new Location(LocationType.STATION, "8003781", null, "Lübeck Airport"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8003781", null, "Lübeck Airport"), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -110,8 +106,7 @@ public class ShProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripKiel() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "3490015"), null,
new Location(LocationType.STATION, "706923"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "706923"), new Date(), true, null);
print(result);
}
@ -119,7 +114,7 @@ public class ShProviderLiveTest extends AbstractProviderLiveTest {
public void tripKielVia() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "3490015"),
new Location(LocationType.STATION, "3490020"), new Location(LocationType.STATION, "706923"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
}
@ -128,15 +123,14 @@ public class ShProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "3490015"), null,
new Location(LocationType.POI,
"A=4@O=Kiel, Hiroshimapark@X=10131697@Y=54324466@U=104@L=970001375@B=1@V=14.9,@p=1397713274@"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
}
@Test
public void trip_errorTooClose() throws Exception {
final Location station = new Location(LocationType.STATION, "003665026");
final QueryTripsResult result = queryTrips(station, null, station, new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
final QueryTripsResult result = queryTrips(station, null, station, new Date(), true, null);
assertEquals(QueryTripsResult.Status.TOO_CLOSE, result.status);
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,13 +23,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.SncbProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -88,8 +85,7 @@ public class SncbProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8821006", "Antwerpen", "Centraal"), null,
new Location(LocationType.STATION, "8813003", "Brussel", "Centraal"), new Date(), true, null,
WalkSpeed.FAST, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8813003", "Brussel", "Centraal"), new Date(), true, null);
print(result);
if (result.context == null)
@ -103,8 +99,7 @@ public class SncbProviderLiveTest extends AbstractProviderLiveTest {
public void longTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "207280", "Brussel", "Wannecouter"), null,
new Location(LocationType.STATION, "207272", "Brussel", "Stadion"), new Date(), true, null,
WalkSpeed.FAST, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "207272", "Brussel", "Stadion"), new Date(), true, null);
print(result);
if (result.context == null)
@ -118,8 +113,7 @@ public class SncbProviderLiveTest extends AbstractProviderLiveTest {
public void tripFromAddress() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, null, "Bruxelles - Haren, Rue Paul Janson 9"), null,
new Location(LocationType.STATION, "8500010", null, "Basel"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "8500010", null, "Basel"), new Date(), true, null);
print(result);
if (result.context == null)

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.StvProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -102,8 +99,7 @@ public class StvProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "63203040", null, "Graz Hauptbahnhof"), null,
new Location(LocationType.STATION, "63203149", null, "Graz Babenbergerstraße"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "63203149", null, "Graz Babenbergerstraße"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.SvvProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -107,7 +104,7 @@ public class SvvProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "455002100", 47797110, 13053632, "Salzburg", "Justizgebäude"), null,
new Location(LocationType.STATION, "455002200", 47794000, 13059223, "Salzburg", "Akademiestraße"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.SydneyProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -89,8 +86,7 @@ public class SydneyProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "10101100", "Sydney", "Central Station"), null,
new Location(LocationType.STATION, null, "Sydney", "Capitol Square"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, null, "Sydney", "Capitol Square"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.TfiProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -73,7 +70,7 @@ public class TfiProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.STATION, "51013670", "Dublin City South",
"O'Connell Bridge (on Lower O'Connell Street)"),
null, new Location(LocationType.STATION, "51005661", "Dublin City South", "Dublin (Baggot Street)"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.TlemProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -95,8 +92,7 @@ public class TlemProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip1() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "1008730", null, "King & Queen Wharf"), null,
new Location(LocationType.STATION, "1006433", null, "Edinburgh Court"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "1006433", null, "Edinburgh Court"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -125,10 +121,9 @@ public class TlemProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "2099014", 52478184, -1898364, "Birmingham",
"Birmingham New Street Rail Station"),
null,
new Location(LocationType.STATION, "2099150", 52585468, -2122962, "Wolverhampton",
null, new Location(LocationType.STATION, "2099150", 52585468, -2122962, "Wolverhampton",
"Wolverhampton Rail Station"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -159,7 +154,7 @@ public class TlemProviderLiveTest extends AbstractProviderLiveTest {
"Bullingdon Prison"),
null,
new Location(LocationType.STATION, "60006013", 51856612, -1112904, "Lower Arncott", "The Plough E"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -191,7 +186,7 @@ public class TlemProviderLiveTest extends AbstractProviderLiveTest {
-314316, "Ham (London)", "Statue"),
null,
new Location(LocationType.ADDRESS, "streetID:106269::31117001:-1", "London", "Cannon Street, London"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
}
@ -200,15 +195,14 @@ public class TlemProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, "streetID:203417::31117006:-1", "London", "Kings Cross, London"),
null, new Location(LocationType.STATION, "1002070", 51508530, 46706, "Royal Albert", "Royal Albert"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
}
@Test
public void tripPostcode() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "se7 7tr"), null,
new Location(LocationType.ANY, null, null, "n9 0nx"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "n9 0nx"), new Date(), true, null);
print(result);
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VagfrProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -80,8 +77,7 @@ public class VagfrProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "6930100", null, "Freiburg Bertoldsbrunnen"), null,
new Location(LocationType.STATION, "6930101", null, "Freiburg Siegesdenkmal"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "6930101", null, "Freiburg Siegesdenkmal"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -108,8 +104,7 @@ public class VagfrProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void trip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "6930120"), null,
new Location(LocationType.STATION, "6930071"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "6930071"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VaoProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -124,8 +121,7 @@ public class VaoProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripFeldkirch() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "480082200", null, "Feldkirch Katzenturm"), null,
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -142,8 +138,7 @@ public class VaoProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripWien() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "490132000", null, "Wien Stephansplatz"), null,
new Location(LocationType.STATION, "490024500", null, "Wien Stubentor"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "490024500", null, "Wien Stubentor"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -161,7 +156,7 @@ public class VaoProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "455000900", 47808976, 13056409, "Salzburg", "Vogelweiderstraße"),
null, new Location(LocationType.STATION, "455084400", 47811556, 13050278, "Salzburg", "Merianstraße"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -192,15 +187,15 @@ public class VaoProviderLiveTest extends AbstractProviderLiveTest {
"A=2@O=6800 Feldkirch, Kapfweg 6@X=9585539@Y=47239257@U=103@L=980092305@B=1@p=1437727591@",
"6800 Feldkirch", "Kapfweg 6"),
null, new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
}
@Test
public void tripCoordinateToStation() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(47238096, 9585581), null,
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true, null);
print(result);
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Assert;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VbbProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -117,8 +114,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"), null,
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -134,7 +130,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.ADDRESS, null, 52435193, 13473409, "12357 Berlin-Buckow", "Kernbeisserweg 4"),
null,
new Location(LocationType.ADDRESS, null, 52433989, 13474353, "12357 Berlin-Buckow", "Distelfinkweg 35"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -149,8 +145,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"),
new Location(LocationType.STATION, "900044202", "Berlin", "Bundesplatz"),
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -163,8 +158,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(52501507, 13357026), null,
Location.coord(52513639, 13568648), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(52513639, 13568648), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -177,8 +171,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void viaTripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(52501507, 13357026),
Location.coord(52479868, 13324247), Location.coord(52513639, 13568648), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
Location.coord(52479868, 13324247), Location.coord(52513639, 13568648), new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -195,7 +188,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
"Weimarische Str. 7"),
null, new Location(LocationType.ADDRESS, null, 52541536, 13421290, "10437 Berlin-Prenzlauer Berg",
"Göhrener Str. 5"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())
@ -213,7 +206,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.ADDRESS, null, 52527872, 13381657, "10115 Berlin-Mitte",
"Hannoversche Str. 20"),
new Location(LocationType.ADDRESS, null, 52526029, 13399878, "10178 Berlin-Mitte", "Sophienstr. 24"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
if (!result.context.canQueryLater())

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VblProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -84,7 +81,7 @@ public class VblProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "53020041", 47050164, 8310352, "Luzern", "Bahnhof"), null,
new Location(LocationType.STATION, "53028841", 47048564, 8306016, "Luzern", "Kantonalbank"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VbnProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -126,8 +123,7 @@ public class VbnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8096109", null, "Oldenburg"),
null, new Location(LocationType.STATION, "625398", null, "Bremerhaven"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "625398", null, "Bremerhaven"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -160,7 +156,7 @@ public class VbnProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripGoettingen() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8000128", null, "Göttingen"),
null, new Location(LocationType.STATION, "1140061", null, "Göttingen Nikolausberger Weg"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -171,7 +167,7 @@ public class VbnProviderLiveTest extends AbstractProviderLiveTest {
public void tripDateOutsideTimetablePeriod() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8096109", null, "Oldenburg"),
null, new Location(LocationType.STATION, "625398", null, "Bremerhaven"), new Date(1155822689759l), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
assertEquals(QueryTripsResult.Status.INVALID_DATE, result.status);
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VgnProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -81,8 +78,7 @@ public class VgnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "451", "Nürnberg", "Ostring"),
null, new Location(LocationType.STATION, "510", "Nürnberg", "Hauptbahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "510", "Nürnberg", "Hauptbahnhof"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -94,7 +90,7 @@ public class VgnProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.POI,
"poiID:246:9564000:1:Grundschule Grimmstr.:Nürnberg:Grundschule Grimmstr.:ANY:POI:4436708:678322:NAV4:VGN",
49468692, 11125334, "Nürnberg", "Grundschule Grimmstr."),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -106,7 +102,7 @@ public class VgnProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "1756", "Nürnberg", "Saarbrückener Str."), null,
new Location(LocationType.ADDRESS, null, 49437392, 11094524, "Nürnberg", "Wodanstraße 25"), new Date(),
false, Product.ALL, WalkSpeed.FAST, Accessibility.NEUTRAL);
false, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,13 +23,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VgsProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -76,8 +73,7 @@ public class VgsProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "10640", "Saarbrücken", "Hauptbahnhof"), null,
new Location(LocationType.STATION, "10700", "Saarbrücken", "Ostbahnhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "10700", "Saarbrücken", "Ostbahnhof"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VmobilProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -124,8 +121,7 @@ public class VmobilProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripFeldkirch() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "480082200", null, "Feldkirch Katzenturm"), null,
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -142,8 +138,7 @@ public class VmobilProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripWien() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "490132000", null, "Wien Stephansplatz"), null,
new Location(LocationType.STATION, "490024500", null, "Wien Stubentor"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "490024500", null, "Wien Stubentor"), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
@ -161,7 +156,7 @@ public class VmobilProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "455000900", 47808976, 13056409, "Salzburg", "Vogelweiderstraße"),
null, new Location(LocationType.STATION, "455084400", 47811556, 13050278, "Salzburg", "Merianstraße"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -192,15 +187,14 @@ public class VmobilProviderLiveTest extends AbstractProviderLiveTest {
"A=2@O=6800 Feldkirch, Kapfweg 6@X=9585539@Y=47239257@U=103@L=980092305@B=1@p=1437727591@",
"6800 Feldkirch", "Kapfweg 6"),
null, new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
}
@Test
public void tripCoordinateToStation() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(47238096, 9585581), null,
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "480081700", null, "Feldkirch Bahnhof"), new Date(), true, null);
print(result);
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VmsProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -72,7 +69,7 @@ public class VmsProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "36030131", 50831380, 12922278, "Chemnitz", "Zentralhaltestelle"),
null, new Location(LocationType.STATION, "36030522", 50836056, 12922042, "Chemnitz", "Stadthalle"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,13 +23,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VmtProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -86,7 +83,7 @@ public class VmtProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "153166", 50926947, 11586987, null, "Jena, Stadtzentrum"), null,
new Location(LocationType.STATION, "153014", 50933887, 11590592, null, "Jena, Spittelpl."), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
System.out.println(result);
if (!result.context.canQueryLater())

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VmvProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -80,7 +77,7 @@ public class VmvProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "44402006", null, "Schwerin Marienplatz"), null,
new Location(LocationType.STATION, "44402007", 53625272, 11409350, null, "Schlossblick"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VorProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -104,7 +101,7 @@ public class VorProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "490065700", 48200852, 16368880, "Wien", "Karlsplatz"), null,
new Location(LocationType.STATION, "490109400", 48198362, 16367667, "Wien", "Resselgasse"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -135,7 +132,7 @@ public class VorProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.POI,
"A=4@O=Naschmarkt, Wien@X=16362903@Y=48198290@U=130@L=960068499@B=1@p=1476842541@", 48198290,
16362903, "Wien", "Naschmarkt"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -144,8 +141,7 @@ public class VorProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(48180281, 16333551), null,
Location.coord(48240452, 16444788), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(48240452, 16444788), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VrnProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -108,7 +105,7 @@ public class VrnProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "6002417", 49479748, 8469938, "Mannheim", "Mannheim, Hauptbahnhof"),
null, new Location(LocationType.STATION, "6005542", 49482892, 8473050, "Mannheim", "Kunsthalle"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -135,8 +132,7 @@ public class VrnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTrip2() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "17002402", null, "Bahnhof"),
null, new Location(LocationType.STATION, "17009001", null, "Bahnhof"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "17009001", null, "Bahnhof"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -163,8 +159,7 @@ public class VrnProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripWithUmlaut() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Käfertal"), null,
new Location(LocationType.STATION, "6002417", "Mannheim", "Hauptbahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "6002417", "Mannheim", "Hauptbahnhof"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VrrProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -133,8 +130,7 @@ public class VrrProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void anyTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Köln"), null,
new Location(LocationType.ANY, null, null, "Bonn"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Bonn"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.AMBIGUOUS, result.status);
}
@ -143,8 +139,7 @@ public class VrrProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "20009289", "Essen", "Hauptbahnhof"), null,
new Location(LocationType.STATION, "20009161", "Essen", "Bismarckplatz"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "20009161", "Essen", "Bismarckplatz"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -172,8 +167,7 @@ public class VrrProviderLiveTest extends AbstractProviderLiveTest {
public void shortTripPaderborn() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "23007000", "Paderborn", "Paderborn Hbf"), null,
new Location(LocationType.STATION, "23007700", "Höxter", "Bahnhof / Rathaus"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "23007700", "Höxter", "Bahnhof / Rathaus"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -200,8 +194,7 @@ public class VrrProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void shortTripDorsten() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "20009643", "Bottrop", "West S"),
null, new Location(LocationType.STATION, "20003214", "Dorsten", "ZOB Dorsten"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null, new Location(LocationType.STATION, "20003214", "Dorsten", "ZOB Dorsten"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -51,6 +51,7 @@ import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.StationDepartures;
import de.schildbach.pte.dto.Style;
import de.schildbach.pte.dto.SuggestLocationsResult;
import de.schildbach.pte.dto.TripOptions;
import de.schildbach.pte.util.Iso8601Format;
/**
@ -264,8 +265,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
public void anyTripAmbiguous() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "Köln"),
new Location(LocationType.ANY, null, null, "Leverkusen"),
new Location(LocationType.ANY, null, null, "Bonn"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Bonn"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.AMBIGUOUS, result.status);
assertNotNull(result.ambiguousFrom);
assertNotNull(result.ambiguousVia);
@ -275,8 +275,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void anyTripUnique() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "T-Mobile"), null,
new Location(LocationType.ANY, null, null, "Schauspielhalle"), new Date(), true, Product.ALL,
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "Schauspielhalle"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
}
@ -284,16 +283,14 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void anyTripUnknown() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.ANY, null, null, "\1"), null,
new Location(LocationType.ANY, null, null, "\2"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.ANY, null, null, "\2"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.UNKNOWN_FROM, result.status);
}
@Test
public void tripEarlierLater() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8"), null,
new Location(LocationType.STATION, "9"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "9"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
print(result);
@ -317,8 +314,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripEarlierLaterCologneBerlin() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "1"), null,
new Location(LocationType.STATION, "11458"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "11458"), new Date(), true, null);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
print(result);
@ -333,10 +329,10 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripWithProductFilter() throws Exception {
final TripOptions options = new TripOptions(EnumSet.of(Product.ON_DEMAND, Product.SUBWAY, Product.FERRY,
Product.TRAM, Product.CABLECAR, Product.BUS), null, WalkSpeed.NORMAL, Accessibility.NEUTRAL, null);
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "1504"), null,
new Location(LocationType.STATION, "1"), new Date(), true, EnumSet.of(Product.ON_DEMAND, Product.SUBWAY,
Product.FERRY, Product.TRAM, Product.CABLECAR, Product.BUS),
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "1"), new Date(), true, options);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
print(result);
@ -345,8 +341,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripBeuelKoelnSued() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "1504"), null,
new Location(LocationType.STATION, "25"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "25"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -355,8 +350,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripBonnHbfBonnBeuel() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "687"), null,
new Location(LocationType.STATION, "1504"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "1504"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -365,8 +359,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripBonnHbfDorotheenstr() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "687"), null,
new Location(LocationType.STATION, "1150"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "1150"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -375,8 +368,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripKoelnHbfBresslauerPlatz() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8"), null,
new Location(LocationType.STATION, "9"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "9"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -385,8 +377,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripDuerenLammersdorf() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "6868"), null,
new Location(LocationType.STATION, "21322"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "21322"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -395,8 +386,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripEhrenfeldNeumarkt() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "251"), null,
new Location(LocationType.STATION, "2"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "2"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -404,10 +394,11 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripCologneWickede() throws Exception {
final TripOptions options = new TripOptions(
EnumSet.of(Product.REGIONAL_TRAIN, Product.SUBURBAN_TRAIN, Product.SUBWAY, Product.TRAM), null,
WalkSpeed.NORMAL, Accessibility.NEUTRAL, null);
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8"), null,
new Location(LocationType.STATION, "10781"), new Date(), true,
EnumSet.of(Product.REGIONAL_TRAIN, Product.SUBURBAN_TRAIN, Product.SUBWAY, Product.TRAM),
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "10781"), new Date(), true, options);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -416,8 +407,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripByCoord() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(50740530, 7129200), null,
Location.coord(50933930, 6932440), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(50933930, 6932440), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -428,8 +418,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null /* id */, 50909350, 6676310, "Kerpen-Sindorf", "Erftstraße 43"),
null, new Location(LocationType.ADDRESS, null /* id */, 50923000, 6818440, "Frechen", "Zedernweg 1"),
Iso8601Format.parseDateTime("2015-03-17 21:11:18"), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Iso8601Format.parseDateTime("2015-03-17 21:11:18"), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -438,8 +427,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripWithSurchargeInfo() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "687"), null,
new Location(LocationType.STATION, "892"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
new Location(LocationType.STATION, "892"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -447,9 +435,10 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void testTripAachenEschweilerBus() throws Exception {
final TripOptions options = new TripOptions(EnumSet.of(Product.BUS), null, WalkSpeed.NORMAL,
Accessibility.NEUTRAL, null);
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "10004"), null,
new Location(LocationType.STATION, "10003"), new Date(), true, EnumSet.of(Product.BUS),
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "10003"), new Date(), true, options);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -466,8 +455,7 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest {
int toLat = latFrom + rand.nextInt(latTo - latFrom);
int toLon = lonFrom + rand.nextInt(lonTo - lonFrom);
final QueryTripsResult result = queryTrips(Location.coord(fromLat, fromLon), null,
Location.coord(toLat, toLon), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(toLat, toLon), new Date(), true, null);
System.out.println("# " + (i + 1));
if (result.status.equals(QueryTripsResult.Status.OK)) {
print(result);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VvmProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -81,7 +78,7 @@ public class VvmProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "3700075", 49801076, 9934302, "Würzburg", "Busbahnhof"), null,
new Location(LocationType.STATION, "3700403", 49797772, 9934986, "Würzburg", "Stift Haug"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VvoProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -93,8 +90,7 @@ public class VvoProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "33000013", null, "Dresden Albertplatz"), null,
new Location(LocationType.STATION, "33000262", null, "Dresden Bischofsweg"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Location(LocationType.STATION, "33000262", null, "Dresden Bischofsweg"), new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -122,10 +118,9 @@ public class VvoProviderLiveTest extends AbstractProviderLiveTest {
public void tripFromAddressToAddress() throws Exception {
final QueryTripsResult result = queryTrips(
new Location(LocationType.ADDRESS, null, 51052260, 13740998, "Dresden", "Dresden, Töpferstraße 10"),
null,
new Location(LocationType.ADDRESS, null, 51029752, 13700666, "Dresden",
null, new Location(LocationType.ADDRESS, null, 51029752, 13700666, "Dresden",
"Dresden, Tharandter Straße 88"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VvsProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -89,7 +86,7 @@ public class VvsProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.STATION, "5006118", 48782984, 9179846, "Stuttgart",
"Stuttgart, Hauptbahnhof"),
null, new Location(LocationType.STATION, "5006024", 48782584, 9187098, "Stuttgart", "Staatsgalerie"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -26,13 +26,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VvtProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -93,7 +90,7 @@ public class VvtProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "476151200", 47268248, 11355560, "Innsbruck", "Allerheiligen"), null,
new Location(LocationType.STATION, "476151000", 47267241, 11351003, "Innsbruck", "Tschiggfreystraße"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,13 +24,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.VvvProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -79,7 +76,7 @@ public class VvvProviderLiveTest extends AbstractProviderLiveTest {
new Location(LocationType.STATION, "30202006", 50484564, 12140028, "Plauen (Vogtl)", "Bickelstraße"),
null,
new Location(LocationType.STATION, "30202012", 50487332, 12139050, "Plauen (Vogtl)", "Hofer Straße"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,13 +27,10 @@ import java.util.EnumSet;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.WienProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -101,7 +98,7 @@ public class WienProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "60200657", 48200756, 16369001, "Wien", "Karlsplatz"), null,
new Location(LocationType.STATION, "60201094", 48198612, 16367719, "Wien", "Resselgasse"), new Date(),
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
true, null);
print(result);
assertEquals(QueryTripsResult.Status.OK, result.status);
assertTrue(result.trips.size() > 0);
@ -128,8 +125,7 @@ public class WienProviderLiveTest extends AbstractProviderLiveTest {
@Test
public void tripBetweenCoordinates() throws Exception {
final QueryTripsResult result = queryTrips(Location.coord(48180281, 16333551), null,
Location.coord(48240452, 16444788), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
Accessibility.NEUTRAL);
Location.coord(48240452, 16444788), new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 the original author or authors.
* Copyright the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,13 +23,10 @@ import java.util.Date;
import org.junit.Test;
import de.schildbach.pte.NetworkProvider.Accessibility;
import de.schildbach.pte.NetworkProvider.WalkSpeed;
import de.schildbach.pte.ZvvProvider;
import de.schildbach.pte.dto.Location;
import de.schildbach.pte.dto.LocationType;
import de.schildbach.pte.dto.NearbyLocationsResult;
import de.schildbach.pte.dto.Product;
import de.schildbach.pte.dto.QueryDeparturesResult;
import de.schildbach.pte.dto.QueryTripsResult;
import de.schildbach.pte.dto.SuggestLocationsResult;
@ -76,7 +73,7 @@ public class ZvvProviderLiveTest extends AbstractProviderLiveTest {
public void shortTrip() throws Exception {
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "8503000", null, "Zürich HB"),
null, new Location(LocationType.STATION, "8507785", null, "Bern, Hauptbahnhof"), new Date(), true,
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);
@ -87,7 +84,7 @@ public class ZvvProviderLiveTest extends AbstractProviderLiveTest {
final QueryTripsResult result = queryTrips(
new Location(LocationType.STATION, "8503000", 47378491, 8537945, "Zürich", "Zürich, Hauptbahnhof"),
null, new Location(LocationType.STATION, "8530812", 47361762, 8560715, "Zürich", "Hegibachplatz"),
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
new Date(), true, null);
print(result);
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
print(laterResult);