From 5e3ee4bf2356638068adb934e593e276502a9542 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 2 Oct 2024 11:31:15 +0200 Subject: [PATCH] refactor: simplify RemoveProjectAction constructor --- .../szut/lf8_starter/project/action/RemoveProjectAction.java | 4 +--- .../integration/project/DeleteProjectActionTest.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java b/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java index 767c22d..4128191 100644 --- a/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java +++ b/src/main/java/de/szut/lf8_starter/project/action/RemoveProjectAction.java @@ -18,11 +18,9 @@ import java.util.Optional; @RequestMapping(value = "projects") public class RemoveProjectAction { private final ProjectService projectService; - private final ProjectMapper projectMapper; - public RemoveProjectAction(ProjectService projectService, ProjectMapper projectMapper) { + public RemoveProjectAction(ProjectService projectService) { this.projectService = projectService; - this.projectMapper = projectMapper; } @Operation(summary = "Remove project by ID") diff --git a/src/test/java/de/szut/lf8_starter/integration/project/DeleteProjectActionTest.java b/src/test/java/de/szut/lf8_starter/integration/project/DeleteProjectActionTest.java index 6d9ee5b..93285ab 100644 --- a/src/test/java/de/szut/lf8_starter/integration/project/DeleteProjectActionTest.java +++ b/src/test/java/de/szut/lf8_starter/integration/project/DeleteProjectActionTest.java @@ -17,7 +17,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @SpringBootTest @AutoConfigureMockMvc(addFilters = false) -public class DeleteProjectActionTest { +class RemoveProjectActionTest { @Autowired private MockMvc mockMvc; @Autowired