Skip to content

Commit

Permalink
test: update jsonmapper test
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <[email protected]>
  • Loading branch information
otaviojava committed Nov 29, 2023
1 parent acca868 commit 7e42842
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/test/java/expert/os/harperdb/JSONMapperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public void shouldWriteValueAsBytes() {

@Test
void shouldReturnEntityFromJSON() {
String expected = "{\"id\":\"123\",\"name\":\"test\"}";
String expected = "[{\"id\":\"123\",\"name\":\"test\"}]";
List<Animal> animals = mapper.readValue(expected.getBytes(), Animal.class);
Assertions.assertThat(animals).isNotNull().isNotEmpty().hasSize(1);
Animal schema = animals.get(0);
Animal animal = animals.get(0);
SoftAssertions.assertSoftly(softly -> {
softly.assertThat(schema.id()).isEqualTo("123");
softly.assertThat(schema.name()).isEqualTo("test");
softly.assertThat(animal.id()).isEqualTo("123");
softly.assertThat(animal.name()).isEqualTo("test");
});
}

Expand Down

0 comments on commit 7e42842

Please sign in to comment.