mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 00:50:31 +00:00
Fix parsing of itdMessageList in tripRequests
This commit is contained in:
parent
c74113709f
commit
6ea46a8fe9
2 changed files with 32 additions and 0 deletions
|
@ -3253,6 +3253,9 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
||||||
if (XmlPullUtil.test(pp, "clientHeaderLines"))
|
if (XmlPullUtil.test(pp, "clientHeaderLines"))
|
||||||
XmlPullUtil.next(pp);
|
XmlPullUtil.next(pp);
|
||||||
|
|
||||||
|
if (XmlPullUtil.test(pp, "itdMessageList"))
|
||||||
|
XmlPullUtil.next(pp);
|
||||||
|
|
||||||
if (XmlPullUtil.test(pp, "itdVersionInfo"))
|
if (XmlPullUtil.test(pp, "itdVersionInfo"))
|
||||||
XmlPullUtil.next(pp);
|
XmlPullUtil.next(pp);
|
||||||
|
|
||||||
|
|
|
@ -113,4 +113,33 @@ public class TflProviderLiveTest extends AbstractProviderLiveTest
|
||||||
Accessibility.NEUTRAL);
|
Accessibility.NEUTRAL);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void tripItdMessageList() throws Exception
|
||||||
|
{
|
||||||
|
final QueryTripsResult result = queryTrips(
|
||||||
|
new Location(LocationType.ADDRESS, 0, 51446072, -239417, "Wandsworth", "Timsbury Walk, Wandsworth"), null, new Location(
|
||||||
|
LocationType.STATION, 90046985, 53225140, -1472433, "Chesterfield (Derbys)",
|
||||||
|
"Walton (Chesterfield), Netherfield Road (on Somersall Lane)"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||||
|
Accessibility.NEUTRAL);
|
||||||
|
System.out.println(result);
|
||||||
|
|
||||||
|
if (!result.context.canQueryLater())
|
||||||
|
return;
|
||||||
|
|
||||||
|
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||||
|
System.out.println(laterResult);
|
||||||
|
|
||||||
|
if (!laterResult.context.canQueryLater())
|
||||||
|
return;
|
||||||
|
|
||||||
|
final QueryTripsResult later2Result = queryMoreTrips(laterResult.context, true);
|
||||||
|
System.out.println(later2Result);
|
||||||
|
|
||||||
|
if (!later2Result.context.canQueryEarlier())
|
||||||
|
return;
|
||||||
|
|
||||||
|
final QueryTripsResult earlierResult = queryMoreTrips(later2Result.context, false);
|
||||||
|
System.out.println(earlierResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue