Added Reified Style to the List Example

This commit is contained in:
Ali Dehghani 2020-07-31 15:31:51 +04:30
parent 749bd7e99a
commit 508b4a2939
1 changed files with 5 additions and 1 deletions

View File

@ -85,7 +85,11 @@ class JacksonUnitTest {
val movie1 = Movie("Endgame", "Marvel", 9.2f)
val movie2 = Movie("Shazam", "Warner Bros", 7.6f)
assertTrue(movieList.contains(movie1))
assertTrue(movieList.contains(movie2))
assertTrue(movieList.contains(movie2))
val sameList = mapper.readValue<List<Movie>>(json)
assertTrue(sameList.contains(movie1))
assertTrue(sameList.contains(movie2))
}
@Test