mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
BVG, VBB: Adapt to new BVG station IDs in test cases.
This commit is contained in:
parent
8e6ae530f3
commit
9b81c69251
2 changed files with 26 additions and 40 deletions
|
@ -46,7 +46,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void nearbyStations() throws Exception {
|
public void nearbyStations() throws Exception {
|
||||||
final NearbyLocationsResult result = queryNearbyStations(new Location(LocationType.STATION, "9220302"));
|
final NearbyLocationsResult result = queryNearbyStations(new Location(LocationType.STATION, "900220302"));
|
||||||
assertEquals(NearbyLocationsResult.Status.OK, result.status);
|
assertEquals(NearbyLocationsResult.Status.OK, result.status);
|
||||||
print(result);
|
print(result);
|
||||||
}
|
}
|
||||||
|
@ -65,30 +65,15 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void queryDepartures() throws Exception {
|
public void queryDepartures() throws Exception {
|
||||||
final QueryDeparturesResult result1 = queryDepartures("9016254", false);
|
final QueryDeparturesResult result1 = queryDepartures("900016254", false);
|
||||||
assertEquals(QueryDeparturesResult.Status.OK, result1.status);
|
assertEquals(QueryDeparturesResult.Status.OK, result1.status);
|
||||||
print(result1);
|
print(result1);
|
||||||
|
|
||||||
final QueryDeparturesResult result2 = queryDepartures("9100003", false);
|
final QueryDeparturesResult result2 = queryDepartures("900100003", false);
|
||||||
assertEquals(QueryDeparturesResult.Status.OK, result2.status);
|
assertEquals(QueryDeparturesResult.Status.OK, result2.status);
|
||||||
print(result2);
|
print(result2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void queryDeparturesMast() throws Exception {
|
|
||||||
final QueryDeparturesResult result1 = queryDepartures("~308864", false);
|
|
||||||
assertEquals(QueryDeparturesResult.Status.OK, result1.status);
|
|
||||||
print(result1);
|
|
||||||
|
|
||||||
final QueryDeparturesResult result2 = queryDepartures("~309306", false);
|
|
||||||
assertEquals(QueryDeparturesResult.Status.OK, result2.status);
|
|
||||||
print(result2);
|
|
||||||
|
|
||||||
final QueryDeparturesResult result3 = queryDepartures("~105837", false);
|
|
||||||
assertEquals(QueryDeparturesResult.Status.OK, result3.status);
|
|
||||||
print(result3);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void queryDeparturesInvalidStation() throws Exception {
|
public void queryDeparturesInvalidStation() throws Exception {
|
||||||
final QueryDeparturesResult result = queryDepartures("999999", false);
|
final QueryDeparturesResult result = queryDepartures("999999", false);
|
||||||
|
@ -100,7 +85,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
final SuggestLocationsResult result = suggestLocations("Güntzelstr.");
|
final SuggestLocationsResult result = suggestLocations("Güntzelstr.");
|
||||||
print(result);
|
print(result);
|
||||||
assertThat(result.getLocations(),
|
assertThat(result.getLocations(),
|
||||||
hasItem(new Location(LocationType.STATION, "9043201", "Berlin", "U Güntzelstr.")));
|
hasItem(new Location(LocationType.STATION, "900043201", "Berlin", "U Güntzelstr.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -115,7 +100,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
final SuggestLocationsResult result = suggestLocations("schwules museum");
|
final SuggestLocationsResult result = suggestLocations("schwules museum");
|
||||||
print(result);
|
print(result);
|
||||||
assertThat(result.getLocations(), hasItem(new Location(LocationType.POI,
|
assertThat(result.getLocations(), hasItem(new Location(LocationType.POI,
|
||||||
"A=4@O=Berlin, Schwules Museum@X=13357979@Y=52504519@U=104@L=9980141@B=1@p=1417107246@")));
|
"A=4@O=Berlin, Schwules Museum@X=13357979@Y=52504519@U=104@L=900980141@B=1@p=1540465509@")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -134,9 +119,9 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
@Test
|
@Test
|
||||||
public void shortTrip() throws Exception {
|
public void shortTrip() throws Exception {
|
||||||
final QueryTripsResult result = queryTrips(
|
final QueryTripsResult result = queryTrips(
|
||||||
new Location(LocationType.STATION, "9056102", "Berlin", "Nollendorfplatz"), null,
|
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"), null,
|
||||||
new Location(LocationType.STATION, "9013103", "Berlin", "Prinzenstraße"), new Date(), true, Product.ALL,
|
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
|
||||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
print(result);
|
print(result);
|
||||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||||
print(laterResult);
|
print(laterResult);
|
||||||
|
@ -151,19 +136,19 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
@Test
|
@Test
|
||||||
public void tripBetweenStations() throws Exception {
|
public void tripBetweenStations() throws Exception {
|
||||||
final QueryTripsResult result = queryTrips(
|
final QueryTripsResult result = queryTrips(
|
||||||
new Location(LocationType.STATION, "9055101", 52496176, 13343273, null, "U Viktoria-Luise-Platz"), null,
|
new Location(LocationType.STATION, "900055101", 52496176, 13343273, null, "U Viktoria-Luise-Platz"),
|
||||||
new Location(LocationType.STATION, "9089303", 52588810, 13288699, null, "S Tegel"), new Date(), true,
|
null, new Location(LocationType.STATION, "900089303", 52588810, 13288699, null, "S Tegel"), new Date(),
|
||||||
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
print(result);
|
print(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shortViaTrip() throws Exception {
|
public void shortViaTrip() throws Exception {
|
||||||
final QueryTripsResult result = queryTrips(
|
final QueryTripsResult result = queryTrips(
|
||||||
new Location(LocationType.STATION, "9056102", "Berlin", "Nollendorfplatz"),
|
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"),
|
||||||
new Location(LocationType.STATION, "9044202", "Berlin", "Bundesplatz"),
|
new Location(LocationType.STATION, "900044202", "Berlin", "Bundesplatz"),
|
||||||
new Location(LocationType.STATION, "9013103", "Berlin", "Prinzenstraße"), new Date(), true, Product.ALL,
|
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
|
||||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
print(result);
|
print(result);
|
||||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||||
print(laterResult);
|
print(laterResult);
|
||||||
|
@ -235,7 +220,8 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
final QueryTripsResult result = queryTrips(
|
final QueryTripsResult result = queryTrips(
|
||||||
new Location(LocationType.ADDRESS, null, 52481922, 13388383, null,
|
new Location(LocationType.ADDRESS, null, 52481922, 13388383, null,
|
||||||
"Bayernring, 12101 Berlin, Deutschland"),
|
"Bayernring, 12101 Berlin, Deutschland"),
|
||||||
null, new Location(LocationType.STATION, "9064301", 52429099, 13328081, null, "S Lichterfelde Ost Bhf"),
|
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, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
print(result);
|
print(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void queryDepartures() throws Exception {
|
public void queryDepartures() throws Exception {
|
||||||
final QueryDeparturesResult result = queryDepartures("9007102", false);
|
final QueryDeparturesResult result = queryDepartures("900007102", false);
|
||||||
print(result);
|
print(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
public void suggestLocationsPOI() throws Exception {
|
public void suggestLocationsPOI() throws Exception {
|
||||||
final SuggestLocationsResult result = suggestLocations("schwules museum");
|
final SuggestLocationsResult result = suggestLocations("schwules museum");
|
||||||
print(result);
|
print(result);
|
||||||
Assert.assertThat(result.getLocations(), hasItem(new Location(LocationType.POI, "9980141")));
|
Assert.assertThat(result.getLocations(), hasItem(new Location(LocationType.POI, "900980141")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -116,9 +116,9 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
@Test
|
@Test
|
||||||
public void shortTrip() throws Exception {
|
public void shortTrip() throws Exception {
|
||||||
final QueryTripsResult result = queryTrips(
|
final QueryTripsResult result = queryTrips(
|
||||||
new Location(LocationType.STATION, "9056102", "Berlin", "Nollendorfplatz"), null,
|
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"), null,
|
||||||
new Location(LocationType.STATION, "9013103", "Berlin", "Prinzenstraße"), new Date(), true, Product.ALL,
|
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
|
||||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
print(result);
|
print(result);
|
||||||
|
|
||||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||||
|
@ -147,10 +147,10 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest {
|
||||||
@Test
|
@Test
|
||||||
public void shortViaTrip() throws Exception {
|
public void shortViaTrip() throws Exception {
|
||||||
final QueryTripsResult result = queryTrips(
|
final QueryTripsResult result = queryTrips(
|
||||||
new Location(LocationType.STATION, "9056102", "Berlin", "Nollendorfplatz"),
|
new Location(LocationType.STATION, "900056102", "Berlin", "Nollendorfplatz"),
|
||||||
new Location(LocationType.STATION, "9044202", "Berlin", "Bundesplatz"),
|
new Location(LocationType.STATION, "900044202", "Berlin", "Bundesplatz"),
|
||||||
new Location(LocationType.STATION, "9013103", "Berlin", "Prinzenstraße"), new Date(), true, Product.ALL,
|
new Location(LocationType.STATION, "900013103", "Berlin", "Prinzenstraße"), new Date(), true,
|
||||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
print(result);
|
print(result);
|
||||||
|
|
||||||
if (!result.context.canQueryLater())
|
if (!result.context.canQueryLater())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue