BAEL-7091

Formatting fixed
This commit is contained in:
parthiv39731 2023-11-06 19:27:07 +05:30
parent c61a1dace1
commit e9431ce416
1 changed files with 4 additions and 6 deletions

View File

@ -11,7 +11,6 @@ import static org.hamcrest.Matchers.*;
import static org.junit.jupiter.api.Assertions.*;
public class AssertNestedMapUnitTest {
@Test
void givenNestedMap_whenUseJupiterAssertTrueWithoutCasting_thenTest() {
Map<String, Object> innerMap = Map.of("city", "Chicago");
@ -26,8 +25,8 @@ public class AssertNestedMapUnitTest {
Map<String, Map<String, Object>> outerMap = Map.of("address", innerMap);
assertAll(
() -> assertTrue(outerMap.containsKey("address")),
() -> assertEquals(outerMap.get("address").get("city"), "Chicago")
() -> assertTrue(outerMap.containsKey("address")),
() -> assertEquals(outerMap.get("address").get("city"), "Chicago")
);
}
@ -45,8 +44,8 @@ public class AssertNestedMapUnitTest {
Map<String, Object> innerMap = Map.of("city", "Chicago");
Map<String, Map<String, Object>> outerMap = Map.of("address", innerMap);
assertAll(
() -> assertThat(outerMap, hasKey("address")),
() -> assertThat(outerMap.get("address"), hasEntry("city", "Chicago"))
() -> assertThat(outerMap, hasKey("address")),
() -> assertThat(outerMap.get("address"), hasEntry("city", "Chicago"))
);
}
@ -82,7 +81,6 @@ public class AssertNestedMapUnitTest {
assertThat(outerMap, hasNestedMapEntry("address", innerMap));
}
@Test
void givenNestedMap_whenUseHamcrestAssertThatWithCasting_thenTest() {
Map<String, Object> innerMap = Map.of("city", "Chicago");