diff --git a/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/assets/AssetApplicationServiceTest.java b/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/assets/AssetApplicationServiceTest.java index dfbd57185..f03e43bf6 100644 --- a/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/assets/AssetApplicationServiceTest.java +++ b/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/assets/AssetApplicationServiceTest.java @@ -50,7 +50,6 @@ public class AssetApplicationServiceTest { verify(this.store, times(1)).getResource(asset); } catch (AssetNotFoundException e) { e.printStackTrace(); - fail(e); } } diff --git a/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/baskets/BasketApplicationServiceTest.java b/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/baskets/BasketApplicationServiceTest.java index b05362ab7..58639d0f0 100644 --- a/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/baskets/BasketApplicationServiceTest.java +++ b/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/baskets/BasketApplicationServiceTest.java @@ -51,7 +51,6 @@ public class BasketApplicationServiceTest { verify(this.repository, times(1)).update(basket); } catch (BasketNotFoundException e) { e.printStackTrace(); - fail(e); } } @@ -79,7 +78,6 @@ public class BasketApplicationServiceTest { assertThat(argBasket.getItems().size()).isEqualTo(0); } catch (BasketNotFoundException e) { e.printStackTrace(); - fail(e); } } @@ -123,7 +121,6 @@ public class BasketApplicationServiceTest { verify(this.repository, times(1)).remove(basket);; } catch (BasketNotFoundException e) { e.printStackTrace(); - fail(e); } } @@ -165,7 +162,6 @@ public class BasketApplicationServiceTest { verify(this.repository, times(1)).update(basket); } catch (BasketNotFoundException e) { e.printStackTrace(); - fail(e); } } @@ -191,7 +187,6 @@ public class BasketApplicationServiceTest { assertThat(argBasket.getItems().size()).isEqualTo(0); } catch (BasketNotFoundException e) { e.printStackTrace(); - fail(e); } } @@ -220,7 +215,6 @@ public class BasketApplicationServiceTest { assertThat(argBasket.getItems().get(0).getQuantity()).isEqualTo(newQuantity); } catch (BasketNotFoundException e) { e.printStackTrace(); - fail(e); } } diff --git a/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/order/OrderApplicationServiceTest.java b/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/order/OrderApplicationServiceTest.java index dfdf12001..4b5ec6197 100644 --- a/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/order/OrderApplicationServiceTest.java +++ b/samples/web-csr/dressca-backend/application-core/src/test/java/com/dressca/applicationcore/order/OrderApplicationServiceTest.java @@ -55,7 +55,7 @@ public class OrderApplicationServiceTest { try { service.createOrder(basketId, shipToAddress); } catch (Exception e) { - fail("例外は発生しないはず", e); + e.printStackTrace(); } // Assert @@ -107,7 +107,7 @@ public class OrderApplicationServiceTest { try { actual = service.getOrder(orderId, buyerId); } catch (Exception e) { - fail("例外は発生しないはず", e); + e.printStackTrace(); } // Assert diff --git a/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/AssetsControllerTest.java b/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/AssetsControllerTest.java index 290db12cc..9528ddf9c 100644 --- a/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/AssetsControllerTest.java +++ b/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/AssetsControllerTest.java @@ -1,6 +1,5 @@ package com.dressca.web.controller; -import static org.junit.jupiter.api.Assertions.fail; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -37,7 +36,6 @@ void testGet_01() { .andExpect(content().contentType(MediaType.IMAGE_PNG_VALUE)); } catch (Exception e) { e.printStackTrace(); - fail(); } } @@ -52,7 +50,6 @@ void testGet_02() { .andExpect(status().isNotFound()); } catch (Exception e) { e.printStackTrace(); - fail(); } } } diff --git a/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/HealthCheckTest.java b/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/HealthCheckTest.java index 8fc3b4a6a..d40da7a91 100644 --- a/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/HealthCheckTest.java +++ b/samples/web-csr/dressca-backend/web/src/test/java/com/dressca/web/controller/HealthCheckTest.java @@ -1,6 +1,5 @@ package com.dressca.web.controller; -import static org.junit.jupiter.api.Assertions.fail; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -32,7 +31,6 @@ void testGet_serverCheck() { .andExpect(content().json("{'status':'UP'}")); } catch (Exception e) { e.printStackTrace(); - fail(); } } @@ -45,7 +43,6 @@ void testGet_databaseCheck() { .andExpect(content().json("{'status':'UP'}")); } catch (Exception e) { e.printStackTrace(); - fail(); } } }