Commit 49cee46f authored by Volker Krause's avatar Volker Krause
Browse files

Add test case for a IVV ASS walking direction response

Parsing of that yet to be implemented.
parent 105aeaab
{"routes":[{"id":"XXX","segments":[{"type":"walk","origin":{"id":35,"tempId":69100,"name":"Ebertplatz (U) Gleis 1","district":"","city":"K\u00f6ln","x":50.95101,"y":6.95954,"subtype":"Post","ifopt":"de:05315:11810:1:11","fullName":"Ebertplatz (U) Gleis 1, K\u00f6ln","type":"stop"},"destination":{"type":"coordinate","x":50.94732,"y":6.96253},"departure":"2021-02-27T13:14:00+01:00","arrival":"2021-02-27T13:23:38+01:00","traveltime":578,"distance":643,"polygon":"50.950611,6.958825 50.950403,6.958730 50.950169,6.958641 50.950156,6.958883 50.950149,6.959026 50.950140,6.959228 50.950100,6.959227 50.949323,6.959219 50.948426,6.959168 50.948383,6.959732 50.948311,6.960412 50.948301,6.960541 50.948193,6.961917 50.948115,6.962247 50.948103,6.962299 50.948030,6.962631 50.948009,6.962707 50.947944,6.963013 50.947913,6.962999 50.947842,6.962963 50.947652,6.962869 50.947448,6.962774 50.947442,6.962684 50.947410,6.962631 50.947375,6.962597 50.947312,6.962548 50.947316,6.962531","directions":[{"headingDegree":197,"street":"Ebertplatz","distance":51,"x":50.95061,"y":6.95883,"heading":"South"},{"headingDegree":262,"street":"Theodor-Heuss-Ring","distance":41,"x":50.95017,"y":6.95864,"heading":"TurnLeft"},{"headingDegree":87,"street":"Domstra\u00dfe","distance":191,"x":50.95014,"y":6.95923,"heading":"TurnRight"},{"headingDegree":275,"street":"Dagobertstra\u00dfe","distance":277,"x":50.94843,"y":6.95917,"heading":"TurnLeft"},{"headingDegree":89,"street":"Kunibertskloster","distance":58,"x":50.94794,"y":6.96301,"heading":"TurnRight"},{"headingDegree":68,"street":"","distance":24,"x":50.94745,"y":6.96277,"heading":"TurnRight"},{"headingDegree":85,"street":"","distance":1,"x":50.94731,"y":6.96255,"heading":"TurnRight"}]}],"changes":0,"costs":{"name":"VRS-Tarif","text":"Preisstufe K [Kurzstrecke] 2,00 \u20ac (als HandyTicket nur 1,80 \u20ac)","price":2,"level":"K","tariffZones":{"start":2100,"end":2100}}}],"containsDemand":false}
[
{
"sections": [
{
"disruptionEffect": "NormalService",
"distance": 818,
"from": {
"identifier": {
"ifopt": "de:05315:11810:1:11"
},
"latitude": 50.951011657714844,
"locality": "Köln",
"longitude": 6.959539890289307,
"name": "Ebertplatz (U) Gleis 1",
"type": "Stop"
},
"mode": "Walking",
"path": {
"sections": [
{
"path": {
"coordinates": [
[
50.950611,
6.958825
],
[
50.950403,
6.95873
],
[
50.950169,
6.958641
],
[
50.950156,
6.958883
],
[
50.950149,
6.959026
],
[
50.95014,
6.959228
],
[
50.9501,
6.959227
],
[
50.949323,
6.959219
],
[
50.948426,
6.959168
],
[
50.948383,
6.959732
],
[
50.948311,
6.960412
],
[
50.948301,
6.960541
],
[
50.948193,
6.961917
],
[
50.948115,
6.962247
],
[
50.948103,
6.962299
],
[
50.94803,
6.962631
],
[
50.948009,
6.962707
],
[
50.947944,
6.963013
],
[
50.947913,
6.962999
],
[
50.947842,
6.962963
],
[
50.947652,
6.962869
],
[
50.947448,
6.962774
],
[
50.947442,
6.962684
],
[
50.94741,
6.962631
],
[
50.947375,
6.962597
],
[
50.947312,
6.962548
],
[
50.947316,
6.962531
]
],
"type": "LineString"
}
}
]
},
"scheduledArrivalTime": "2021-02-27T13:23:38+01:00",
"scheduledDepartureTime": "2021-02-27T13:14:00+01:00",
"to": {
"latitude": 50.94731903076172,
"longitude": 6.962530136108398
}
}
]
}
]
......@@ -103,6 +103,9 @@ private Q_SLOTS:
QTest::newRow("journey-long-distance-vrs")
<< s(SOURCE_DIR "/data/ivvass/journey-long-distance-vrs-input.json")
<< s(SOURCE_DIR "/data/ivvass/journey-long-distance-vrs-output.json");
QTest::newRow("journey-walking-directions-vrs")
<< s(SOURCE_DIR "/data/ivvass/journey-walking-directions-vrs-input.json")
<< s(SOURCE_DIR "/data/ivvass/journey-walking-directions-vrs-output.json");
}
void testParseJourneys()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment