Skip to content

Commit

Permalink
Add test for ofNullable
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed May 29, 2024
1 parent d46d895 commit f9f5f49
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,11 @@ void distinctByKey() {
assertEquals(List.of(first, third), deduplicated);
}

@Test
void ofNullable() {
assertEquals(List.of(), ListUtils.ofNullable(null));
assertEquals(List.of("A"), ListUtils.ofNullable("A"));
}

private record Wrapper(int i, String string) {}
}

0 comments on commit f9f5f49

Please sign in to comment.