Skip to content

Commit

Permalink
test: 테스트 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hong-sile committed Sep 25, 2023
1 parent dbd8cfa commit ec903f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/test/java/com/techcourse/DispatcherServletTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import webmvc.org.springframework.web.servlet.mvc.tobe.handler_mapping.AnnotationHandlerMapping;
import webmvc.org.springframework.web.servlet.mvc.tobe.DispatcherServlet;
import webmvc.org.springframework.web.servlet.mvc.tobe.handler_mapping.AnnotationHandlerMapping;

class DispatcherServletTest {

Expand Down Expand Up @@ -53,6 +53,7 @@ void show() throws ServletException, IOException {
//given
final ArgumentCaptor<String> argumentCaptor = ArgumentCaptor.forClass(String.class);
final RequestDispatcher requestDispatcher = mock(RequestDispatcher.class);
when(request.getRequestURI()).thenReturn("/register/view");
when(request.getMethod()).thenReturn("GET");
when(request.getRequestDispatcher(argumentCaptor.capture()))
.thenReturn(requestDispatcher);
Expand Down

0 comments on commit ec903f8

Please sign in to comment.