Skip to content
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

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

wonu606
Copy link
Contributor

@wonu606 wonu606 commented Dec 18, 2023

한 일

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

앞으로 해야할 일

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

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