From ecae035bfc3e9355ced37447d688dd7c226d814a Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Thu, 17 Oct 2024 13:42:39 +0100 Subject: [PATCH] add test cases for cableway mapping --- .../netex/mapping/StopPlaceTypeMapperTest.java | 9 +++++++++ .../netex/mapping/TransportModeMapperTest.java | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java b/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java index cb9dabc911d..50e0f45929a 100644 --- a/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java +++ b/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java @@ -30,6 +30,15 @@ void mapWithTransportModeOnly() { assertNull(transitMode.subMode()); } + @Test + void mapCableway() { + var transitMode = stopPlaceTypeMapper.map( + new StopPlace().withTransportMode(AllVehicleModesOfTransportEnumeration.CABLEWAY) + ); + assertEquals(TransitMode.GONDOLA, transitMode.mainMode()); + assertNull(transitMode.subMode()); + } + @Test void mapWithSubMode() { var transitMode = stopPlaceTypeMapper.map( diff --git a/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java b/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java index 5df2cc3dc05..11c41548a60 100644 --- a/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java +++ b/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java @@ -67,6 +67,13 @@ void mapWithTransportModeOnly() throws UnsupportedModeException { assertNull(transitMode.subMode()); } + @Test + void mapCableway() throws UnsupportedModeException { + var transitMode = transportModeMapper.map(AllVehicleModesOfTransportEnumeration.CABLEWAY, null); + assertEquals(TransitMode.GONDOLA, transitMode.mainMode()); + assertNull(transitMode.subMode()); + } + @Test void mapWithSubMode() throws UnsupportedModeException { var transitMode = transportModeMapper.map(