Formatting

This commit is contained in:
Dave Syer 2024-05-16 15:23:56 +01:00
parent bf3bc29e56
commit c0bc917426
2 changed files with 3 additions and 3 deletions

View file

@ -224,7 +224,8 @@ class OwnerControllerTests {
.andExpect(model().attribute("owner", hasProperty("city", is("Madison"))))
.andExpect(model().attribute("owner", hasProperty("telephone", is("6085551023"))))
.andExpect(model().attribute("owner", hasProperty("pets", not(empty()))))
.andExpect(model().attribute("owner", hasProperty("pets", hasItem(hasProperty("visits", hasSize(greaterThan(0)))))))
.andExpect(model().attribute("owner",
hasProperty("pets", hasItem(hasProperty("visits", hasSize(greaterThan(0)))))))
.andExpect(view().name("owners/ownerDetails"));
}

View file

@ -34,8 +34,7 @@ class CrashControllerTests {
@Test
void testTriggerException() {
assertThatExceptionOfType(RuntimeException.class)
.isThrownBy(()->testee.triggerException())
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> testee.triggerException())
.withMessageContaining("Expected: controller used to showcase what happens when an exception is thrown");
}