Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
samleeflang committed Nov 20, 2024
1 parent 883a732 commit d0e2490
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ void testRetrieveFromDWCANull() {
// Then
assertThat(result).isNull();
}

@Test
void testRetrieveFromDWCAUnSanitizable() {
// Given
var unit = MAPPER.createObjectNode();
unit.put("dwc:maximumDepthInMeters", "235 ft");

// When
var result = maximumDepthInMeters.retrieveFromDWCA(unit);

// Then
assertThat(result).isEqualTo("235 ft");
}

@ParameterizedTest
@ValueSource(strings = {"-350m.", "-350meter", "-350 m", "-350 MTR"})
void testRetrieveFromABCD(String input) {
Expand Down

0 comments on commit d0e2490

Please sign in to comment.