From c0bc91742605c3cd686ce86426cf9961f0a2c180 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 16 May 2024 15:23:56 +0100 Subject: [PATCH] Formatting --- .../samples/petclinic/owner/OwnerControllerTests.java | 3 ++- .../samples/petclinic/system/CrashControllerTests.java | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java b/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java index 618ee5b20..0ba224a63 100644 --- a/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java +++ b/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java @@ -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")); } diff --git a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java b/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java index 3dddd8858..09773aec8 100644 --- a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java +++ b/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java @@ -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"); }