Skip to content

ControllerTest RestDocsSupport를 상속받아 테스트를 수행하도록 리팩토링#132

Open
wonu606 wants to merge 6 commits intodevelopfrom
test-controller
Open

ControllerTest RestDocsSupport를 상속받아 테스트를 수행하도록 리팩토링#132
wonu606 wants to merge 6 commits intodevelopfrom
test-controller

Conversation

@wonu606
Copy link
Contributor

@wonu606 wonu606 commented Dec 18, 2023

한 일

  • RestDocsSupport 구현
  • MockBean을 사용한 ControllerTest RestDocsSupport를 상속받아 테스트를 수행하도록 리팩토링

앞으로 해야할 일

  • 컨트롤러 테스트가 RestDocs 문서를 만들도록 구현
  • Autowired를 하고 있는 컨트롤러들 Mock을 가지도록 수정

@wonu606 wonu606 requested review from byeolhaha and onetuks December 18, 2023 12:59
Copy link
Contributor

@onetuks onetuks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트 설정이 제일 어려운 것 같습니다.
고생하셨습니다 ㅠㅠ

Comment on lines +33 to +34
academyCalendarService = mock(AcademyCalendarService.class);
academyCalendarFacade = mock(AcademyCalendarFacade.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 Mock 제거하기로 해서, 이 코드는 없어질 것 같네요!

Comment on lines +16 to +18
@ExtendWith(RestDocumentationExtension.class)
public abstract class RestDocsSupport {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

설정 클래스가 아닌 추상 클래스를 선택하신 이유가 궁금합니다!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants