-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[week4,5] howoldareu 리팩토링 및 테스트 코드 15개 작성 #1
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다 !
assertEquals(Success.CREATE_MEMBER_SUCCESS.getHttpStatus(), result.getCode()); | ||
assertEquals(Success.CREATE_MEMBER_SUCCESS.getMessage(), result.getMessage()); | ||
assertEquals(response, result.getData()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUnit으로 Test Code 쓰셨네요 ...
); | ||
|
||
// given(questionService.getQuestionResponseDTOList()).willReturn(List.of(response1, response2)); | ||
doReturn(List.of(response1, response2)).when(questionService) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
배워갑니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고많으셨습니다!!
mockMvc = MockMvcBuilders.standaloneSetup(memberController).build(); | ||
} | ||
|
||
// ai가 나보다 잘짠다.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
); | ||
|
||
// given(questionService.getQuestionResponseDTOList()).willReturn(List.of(response1, response2)); | ||
doReturn(List.of(response1, response2)).when(questionService) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22
.getAllResults(any(Long.class)); | ||
// when | ||
ResultActions resultActions = mockMvc.perform( | ||
MockMvcRequestBuilders.get("/result/1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 API ENDPOINT 분리해도 좋지 않을까요?
4-5주차 Test Code 15개 작성했습니다.