From e73479feecc7457f80505c9c4989a3b7871df558 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Mon, 4 Aug 2025 21:29:31 +0800 Subject: [PATCH] Load ReactionMapper in controller tests --- .../java/com/openisle/controller/ReactionControllerTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/test/java/com/openisle/controller/ReactionControllerTest.java b/backend/src/test/java/com/openisle/controller/ReactionControllerTest.java index 697a2dfd0..635dad98e 100644 --- a/backend/src/test/java/com/openisle/controller/ReactionControllerTest.java +++ b/backend/src/test/java/com/openisle/controller/ReactionControllerTest.java @@ -7,12 +7,14 @@ import com.openisle.model.ReactionType; import com.openisle.model.User; import com.openisle.service.ReactionService; import com.openisle.service.LevelService; +import com.openisle.mapper.ReactionMapper; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.context.annotation.Import; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.test.web.servlet.MockMvc; @@ -24,6 +26,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @WebMvcTest(ReactionController.class) @AutoConfigureMockMvc(addFilters = false) +@Import(ReactionMapper.class) class ReactionControllerTest { @Autowired private MockMvc mockMvc;