Skip to content

Commit

Permalink
test: create map type reference scenario
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Feb 1, 2024
1 parent 4e5a8a1 commit bb5313c
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -106,6 +106,17 @@ void shouldConvertEntryToMap() {
assertThat(map).hasSize(1).contains(entry("key", "value"));
}

@Test
@DisplayName("Should convert list of entry to Map")
void shouldConvertEntriesToMap() {
List<Entry> entries = List.of(new EntryTest("key", Value.of("value")),
new EntryTest("key2", Value.of("value")));
Map<String, String> map = referenceReader.convert(new TypeReference<>() {
}, entries);

assertThat(map).hasSize(2).contains(entry("key", "value"), entry("key2", "value"));
}

@Test
@DisplayName("Should convert SubEntry to Map")
void shouldConvertSubEntryToMap() {
Expand Down

0 comments on commit bb5313c

Please sign in to comment.