Skip to content

Commit

Permalink
add test cases for cableway mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
miklcct committed Oct 17, 2024
1 parent 7eee9b3 commit ecae035
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ecae035

Please sign in to comment.