Commit a07ec8de authored by Volker Krause's avatar Volker Krause
Browse files

Add TRIAS location query parsing test

parent b30533b3
[
{
"identifier": {
"uic": "de:14612:28"
},
"latitude": 51.0399284362793,
"locality": "Dresden",
"longitude": 13.732930183410645,
"name": "Hauptbahnhof",
"type": "Stop"
},
{
"identifier": {
"uic": "de:14612:32"
},
"latitude": 51.0413703918457,
"locality": "Dresden",
"longitude": 13.735090255737305,
"name": "Hauptbahnhof Nord",
"type": "Stop"
},
{
"identifier": {
"uic": "de:14612:36"
},
"latitude": 51.038719177246094,
"locality": "Dresden",
"longitude": 13.734049797058105,
"name": "Hauptbahnhof (Strehlener Str.)",
"type": "Stop"
}
]
<?xml version="1.0" encoding="UTF-8"?>
<trias:Trias xmlns:siri="http://www.siri.org.uk/siri" xmlns:trias="http://www.vdv.de/trias" xmlns:acsb="http://www.ifopt.org.uk/acsb" xmlns:ifopt="http://www.ifopt.org.uk/ifopt" xmlns:datex2="http://datex2.eu/schema/1_0/1_0" version="1.2"><trias:ServiceDelivery><siri:ResponseTimestamp>2021-09-10T18:08:19Z</siri:ResponseTimestamp><siri:ProducerRef>EFAController10.4.16.4-EFA4</siri:ProducerRef><siri:Status>true</siri:Status><trias:Language>de</trias:Language><trias:CalcTime>49</trias:CalcTime><trias:DeliveryPayload><trias:LocationInformationResponse><trias:LocationResult><trias:Location><trias:StopPoint><trias:StopPointRef>de:14612:28</trias:StopPointRef><trias:StopPointName><trias:Text>Hauptbahnhof</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:LocalityRef>14612000:1</trias:LocalityRef></trias:StopPoint><trias:LocationName><trias:Text>Dresden</trias:Text><trias:Language>de</trias:Language></trias:LocationName><trias:GeoPosition><trias:Longitude>13.73293</trias:Longitude><trias:Latitude>51.03993</trias:Latitude></trias:GeoPosition></trias:Location><trias:Complete>true</trias:Complete><trias:Probability>1</trias:Probability></trias:LocationResult><trias:LocationResult><trias:Location><trias:StopPoint><trias:StopPointRef>de:14612:32</trias:StopPointRef><trias:StopPointName><trias:Text>Hauptbahnhof Nord</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:LocalityRef>14612000:1</trias:LocalityRef></trias:StopPoint><trias:LocationName><trias:Text>Dresden</trias:Text><trias:Language>de</trias:Language></trias:LocationName><trias:GeoPosition><trias:Longitude>13.73509</trias:Longitude><trias:Latitude>51.04137</trias:Latitude></trias:GeoPosition></trias:Location><trias:Complete>true</trias:Complete><trias:Probability>0.882000029</trias:Probability></trias:LocationResult><trias:LocationResult><trias:Location><trias:StopPoint><trias:StopPointRef>de:14612:36</trias:StopPointRef><trias:StopPointName><trias:Text>Hauptbahnhof (Strehlener Str.)</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:LocalityRef>14612000:1</trias:LocalityRef></trias:StopPoint><trias:LocationName><trias:Text>Dresden</trias:Text><trias:Language>de</trias:Language></trias:LocationName><trias:GeoPosition><trias:Longitude>13.73405</trias:Longitude><trias:Latitude>51.03872</trias:Latitude></trias:GeoPosition></trias:Location><trias:Complete>true</trias:Complete><trias:Probability>0.864000022</trias:Probability></trias:LocationResult></trias:LocationInformationResponse></trias:DeliveryPayload></trias:ServiceDelivery></trias:Trias>
......@@ -48,6 +48,9 @@ private Q_SLOTS:
QTest::newRow("ch-location-by-name")
<< s(SOURCE_DIR "/data/ojp/ch-location-by-name.xml")
<< s(SOURCE_DIR "/data/ojp/ch-location-by-name.json");
QTest::newRow("vvo-location-by-name")
<< s(SOURCE_DIR "/data/ojp/vvo-location-by-name.xml")
<< s(SOURCE_DIR "/data/ojp/vvo-location-by-name.json");
}
void testParseLocations()
......
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