Commit 7ac774b5 authored by Volker Krause's avatar Volker Krause
Browse files

Add test for TRIAS trip responses with intermediate stops

parent 51ee3957
[
{
"sections": [
{
"disruptionEffect": "NormalService",
"distance": 0,
"from": {
"latitude": 50.839599609375,
"longitude": 12.930700302124023,
"name": "Chemnitz Hbf"
},
"mode": "Walking",
"scheduledArrivalTime": "2021-09-11T11:25:00Z",
"scheduledDepartureTime": "2021-09-11T11:22:00Z",
"to": {
"name": "Chemnitz, Hauptbahnhof"
}
},
{
"disruptionEffect": "NormalService",
"distance": 0,
"expectedArrivalTime": "2021-09-11T11:46:00Z",
"expectedDepartureTime": "2021-09-11T11:30:00Z",
"from": {
"name": "Chemnitz, Hauptbahnhof"
},
"intermediateStops": [
{
"disruptionEffect": "NormalService",
"expectedArrivalTime": "2021-09-11T11:34:00Z",
"expectedDepartureTime": "2021-09-11T11:34:00Z",
"scheduledArrivalTime": "2021-09-11T11:33:00Z",
"scheduledDepartureTime": "2021-09-11T11:34:00Z",
"scheduledPlatform": "2",
"stopPoint": {
"name": "Chemnitz, Bahnhof Hilbersdorf"
}
},
{
"disruptionEffect": "NormalService",
"expectedArrivalTime": "2021-09-11T11:38:00Z",
"expectedDepartureTime": "2021-09-11T11:38:00Z",
"scheduledArrivalTime": "2021-09-11T11:37:00Z",
"scheduledDepartureTime": "2021-09-11T11:38:00Z",
"scheduledPlatform": "2",
"stopPoint": {
"name": "Niederwiesa, Bf"
}
},
{
"disruptionEffect": "NormalService",
"expectedArrivalTime": "2021-09-11T11:41:00Z",
"expectedDepartureTime": "2021-09-11T11:43:00Z",
"scheduledArrivalTime": "2021-09-11T11:41:00Z",
"scheduledDepartureTime": "2021-09-11T11:43:00Z",
"scheduledPlatform": "5",
"stopPoint": {
"name": "Flöha, Bahnhof"
}
}
],
"mode": "PublicTransport",
"notes": [
"Fahrradmitnahme begrenzt möglich",
"Linienaenderung: Fahrplanabweichungen und Schienenersatzverkehr"
],
"route": {
"direction": "Dresden Hauptbahnhof",
"line": {
"mode": "LocalTrain",
"name": "RB30"
}
},
"scheduledArrivalPlatform": "2",
"scheduledArrivalTime": "2021-09-11T11:45:00Z",
"scheduledDeparturePlatform": "12",
"scheduledDepartureTime": "2021-09-11T11:30:00Z",
"to": {
"name": "Falkenau (Sachs), Süd"
}
},
{
"disruptionEffect": "NormalService",
"distance": 0,
"from": {
"name": "Falkenau (Sachs), Süd"
},
"mode": "Walking",
"scheduledArrivalTime": "2021-09-11T11:48:00Z",
"scheduledDepartureTime": "2021-09-11T11:47:00Z",
"to": {
"latitude": 50.849300384521484,
"longitude": 13.110199928283691,
"name": "Falkenau Süd"
}
}
]
}
]
<?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-11T10:52:00Z</siri:ResponseTimestamp><siri:ProducerRef>EFAController10.4.16.4-EFA3</siri:ProducerRef><siri:Status>true</siri:Status><trias:Language>de</trias:Language><trias:CalcTime>382</trias:CalcTime><trias:DeliveryPayload><trias:TripResponse><trias:TripResponseContext><trias:Situations><trias:PtSituation><siri:CreationTime>2021-08-30T10:01:00Z</siri:CreationTime><siri:ParticipantRef>vvo</siri:ParticipantRef><siri:SituationNumber>13025</siri:SituationNumber><siri:Version>147096061</siri:Version><siri:Source><siri:SourceType>other</siri:SourceType></siri:Source><siri:ValidityPeriod><siri:StartTime>2021-09-10T22:00:00Z</siri:StartTime><siri:EndTime>2021-09-13T22:00:00Z</siri:EndTime></siri:ValidityPeriod><siri:UnknownReason>unknown</siri:UnknownReason><siri:Priority>3</siri:Priority><siri:ScopeType>line</siri:ScopeType><siri:Summary>Linienaenderung</siri:Summary><siri:Description>Fahrplanabweichungen und Schienenersatzverkehr</siri:Description><siri:Detail>&lt;p&gt;Aufgrund von Bauarbeiten der DB Netz AG kommt es auf den Strecken Dresden Hbf – Zwickau Hbf sowie Dresden Hbf - Hof Hbf zu Fahrplanabweichungen. Züge der RB 30 und des RE 3 entfallen zwischen Chemnitz Hbf und Chemnitz-Siegmar. Der Streckenabschnitt wird durch Busse im Schienenersatzverkehr bedient. Es kommt zu abweichenden Abfahrts- und Ankunftszeiten. Alle nicht im Baustellenfahrplan aufgeführten Zugverbindungen verkehren nach Regelfahrplan.&lt;/p&gt; inEFA="false";MeldungTyp="Information"</siri:Detail></trias:PtSituation></trias:Situations></trias:TripResponseContext><trias:TripResult><trias:ResultId>ID-6155A7DB-1369-4DAE-992F-7F70DC02B3ED</trias:ResultId><trias:Trip><trias:TripId>ID-6155A7DB-1369-4DAE-992F-7F70DC02B3ED</trias:TripId><trias:Duration>PT26M</trias:Duration><trias:StartTime>2021-09-11T11:22:00Z</trias:StartTime><trias:EndTime>2021-09-11T11:48:00Z</trias:EndTime><trias:Interchanges>0</trias:Interchanges><trias:TripLeg><trias:LegId>1</trias:LegId><trias:ContinuousLeg><trias:LegStart><trias:GeoPosition><trias:Longitude>12.93070</trias:Longitude><trias:Latitude>50.83960</trias:Latitude></trias:GeoPosition><trias:LocationName><trias:Text>Chemnitz Hbf</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegStart><trias:LegEnd><trias:StopPointRef>de:14511:30062</trias:StopPointRef><trias:LocationName><trias:Text>Chemnitz, Hauptbahnhof</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegEnd><trias:Service><trias:IndividualMode>walk</trias:IndividualMode></trias:Service><trias:TimeWindowStart>2021-09-11T11:22:00Z</trias:TimeWindowStart><trias:TimeWindowEnd>2021-09-11T11:25:00Z</trias:TimeWindowEnd><trias:Duration>PT3M</trias:Duration><trias:Length>154</trias:Length></trias:ContinuousLeg></trias:TripLeg><trias:TripLeg><trias:LegId>2</trias:LegId><trias:InterchangeLeg><trias:InterchangeMode>walk</trias:InterchangeMode><trias:LegStart><trias:StopPointRef>de:14511:30062</trias:StopPointRef><trias:LocationName><trias:Text>Chemnitz, Hauptbahnhof</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegStart><trias:LegEnd><trias:StopPointRef>de:14511:30062:7:12</trias:StopPointRef><trias:LocationName><trias:Text>Chemnitz, Hauptbahnhof</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegEnd><trias:TimeWindowStart>2021-09-11T11:25:00Z</trias:TimeWindowStart><trias:TimeWindowEnd>2021-09-11T11:30:00Z</trias:TimeWindowEnd><trias:Duration>PT5M</trias:Duration><trias:WalkDuration>PT4M</trias:WalkDuration><trias:BufferTime>PT1M</trias:BufferTime></trias:InterchangeLeg></trias:TripLeg><trias:TripLeg><trias:LegId>3</trias:LegId><trias:TimedLeg><trias:LegBoard><trias:StopPointRef>de:14511:30062:7:12</trias:StopPointRef><trias:StopPointName><trias:Text>Chemnitz, Hauptbahnhof</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:PlannedBay><trias:Text>12</trias:Text><trias:Language>de</trias:Language></trias:PlannedBay><trias:ServiceDeparture><trias:TimetabledTime>2021-09-11T11:30:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:30:00Z</trias:EstimatedTime></trias:ServiceDeparture><trias:StopSeqNumber>1</trias:StopSeqNumber></trias:LegBoard><trias:LegIntermediates><trias:StopPointRef>de:14511:30085:3:2</trias:StopPointRef><trias:StopPointName><trias:Text>Chemnitz, Bahnhof Hilbersdorf</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:PlannedBay><trias:Text>2</trias:Text><trias:Language>de</trias:Language></trias:PlannedBay><trias:ServiceArrival><trias:TimetabledTime>2021-09-11T11:33:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:34:00Z</trias:EstimatedTime></trias:ServiceArrival><trias:ServiceDeparture><trias:TimetabledTime>2021-09-11T11:34:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:34:00Z</trias:EstimatedTime></trias:ServiceDeparture><trias:StopSeqNumber>2</trias:StopSeqNumber></trias:LegIntermediates><trias:LegIntermediates><trias:StopPointRef>de:14522:30320:3:2</trias:StopPointRef><trias:StopPointName><trias:Text>Niederwiesa, Bf</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:PlannedBay><trias:Text>2</trias:Text><trias:Language>de</trias:Language></trias:PlannedBay><trias:ServiceArrival><trias:TimetabledTime>2021-09-11T11:37:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:38:00Z</trias:EstimatedTime></trias:ServiceArrival><trias:ServiceDeparture><trias:TimetabledTime>2021-09-11T11:38:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:38:00Z</trias:EstimatedTime></trias:ServiceDeparture><trias:StopSeqNumber>3</trias:StopSeqNumber></trias:LegIntermediates><trias:LegIntermediates><trias:StopPointRef>de:14522:55108:3:5</trias:StopPointRef><trias:StopPointName><trias:Text>Flöha, Bahnhof</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:PlannedBay><trias:Text>5</trias:Text><trias:Language>de</trias:Language></trias:PlannedBay><trias:ServiceArrival><trias:TimetabledTime>2021-09-11T11:41:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:41:00Z</trias:EstimatedTime></trias:ServiceArrival><trias:ServiceDeparture><trias:TimetabledTime>2021-09-11T11:43:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:43:00Z</trias:EstimatedTime></trias:ServiceDeparture><trias:StopSeqNumber>4</trias:StopSeqNumber></trias:LegIntermediates><trias:LegAlight><trias:StopPointRef>de:14522:51529:2:2</trias:StopPointRef><trias:StopPointName><trias:Text>Falkenau (Sachs), Süd</trias:Text><trias:Language>de</trias:Language></trias:StopPointName><trias:PlannedBay><trias:Text>2</trias:Text><trias:Language>de</trias:Language></trias:PlannedBay><trias:ServiceArrival><trias:TimetabledTime>2021-09-11T11:45:00Z</trias:TimetabledTime><trias:EstimatedTime>2021-09-11T11:46:00Z</trias:EstimatedTime></trias:ServiceArrival><trias:StopSeqNumber>5</trias:StopSeqNumber></trias:LegAlight><trias:Service><trias:OperatingDayRef>2021-09-11</trias:OperatingDayRef><trias:JourneyRef>ddb:90D30::R:j21:140</trias:JourneyRef><trias:ServiceSection><trias:LineRef>ddb:90D30::R</trias:LineRef><trias:DirectionRef>return</trias:DirectionRef><trias:Mode><trias:PtMode>rail</trias:PtMode><trias:RailSubmode>regionalRail</trias:RailSubmode><trias:Name><trias:Text>Zug</trias:Text><trias:Language>de</trias:Language></trias:Name></trias:Mode><trias:PublishedLineName><trias:Text>RB30</trias:Text><trias:Language>de</trias:Language></trias:PublishedLineName><trias:OperatorRef>ddb:CX</trias:OperatorRef></trias:ServiceSection><trias:Attribute><trias:Text><trias:Text>Fahrradmitnahme begrenzt möglich</trias:Text><trias:Language>de</trias:Language></trias:Text><trias:Code>FB</trias:Code></trias:Attribute><trias:OriginText><trias:Text></trias:Text><trias:Language>de</trias:Language></trias:OriginText><trias:DestinationStopPointRef>de:14612:28</trias:DestinationStopPointRef><trias:DestinationText><trias:Text>Dresden Hauptbahnhof</trias:Text><trias:Language>de</trias:Language></trias:DestinationText><trias:SituationFullRef><siri:ParticipantRef>vvo</siri:ParticipantRef><siri:SituationNumber>13025</siri:SituationNumber></trias:SituationFullRef></trias:Service></trias:TimedLeg></trias:TripLeg><trias:TripLeg><trias:LegId>4</trias:LegId><trias:InterchangeLeg><trias:InterchangeMode>walk</trias:InterchangeMode><trias:LegStart><trias:StopPointRef>de:14522:51529:2:2</trias:StopPointRef><trias:LocationName><trias:Text>Falkenau (Sachs), Süd</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegStart><trias:LegEnd><trias:StopPointRef>de:14522:51529</trias:StopPointRef><trias:LocationName><trias:Text>Falkenau (Sachs), Süd</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegEnd><trias:TimeWindowStart>2021-09-11T11:46:00Z</trias:TimeWindowStart><trias:TimeWindowEnd>2021-09-11T11:47:00Z</trias:TimeWindowEnd><trias:Duration>PT1M</trias:Duration><trias:WalkDuration>PT1M</trias:WalkDuration><trias:BufferTime>PT0M</trias:BufferTime></trias:InterchangeLeg></trias:TripLeg><trias:TripLeg><trias:LegId>5</trias:LegId><trias:ContinuousLeg><trias:LegStart><trias:StopPointRef>de:14522:51529</trias:StopPointRef><trias:LocationName><trias:Text>Falkenau (Sachs), Süd</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegStart><trias:LegEnd><trias:GeoPosition><trias:Longitude>13.11020</trias:Longitude><trias:Latitude>50.84930</trias:Latitude></trias:GeoPosition><trias:LocationName><trias:Text>Falkenau Süd</trias:Text><trias:Language>de</trias:Language></trias:LocationName></trias:LegEnd><trias:Service><trias:IndividualMode>walk</trias:IndividualMode></trias:Service><trias:TimeWindowStart>2021-09-11T11:47:00Z</trias:TimeWindowStart><trias:TimeWindowEnd>2021-09-11T11:48:00Z</trias:TimeWindowEnd><trias:Duration>PT1M</trias:Duration><trias:Length>58</trias:Length></trias:ContinuousLeg></trias:TripLeg></trias:Trip></trias:TripResult></trias:TripResponse></trias:DeliveryPayload></trias:ServiceDelivery></trias:Trias>
......@@ -114,6 +114,9 @@ private Q_SLOTS:
QTest::newRow("ch-journey-basic")
<< s(SOURCE_DIR "/data/ojp/ch-journey-basic.xml")
<< s(SOURCE_DIR "/data/ojp/ch-journey-basic.json");
QTest::newRow("vvo-journey-intermediates")
<< s(SOURCE_DIR "/data/ojp/vvo-journey-intermediates.xml")
<< s(SOURCE_DIR "/data/ojp/vvo-journey-intermediates.json");
}
void testParseJourney()
......
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