Skip to content

test: 설문 관련 도메인 테스트 추가 - #64

Open
minji-park-eng wants to merge 9 commits into
mainfrom
test/form-related-testcase
Open

minji-park-eng wants to merge 9 commits into
mainfrom
test/form-related-testcase

Conversation

@minji-park-eng

@minji-park-eng minji-park-eng commented May 8, 2024

Copy link
Copy Markdown
Collaborator

PR Desciption

  • 설문 관련 도메인 테스트 코드 리팩토링

- JpaRepository 대신 EntityManager 사용하여 의존성 제거, 코드 간결하게 수정
- 중복된 테스트케이스 삭제
@minji-park-eng
minji-park-eng requested a review from gurwls0122 May 8, 2024 07:47

@gurwls0122 gurwls0122 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

고생하셨습니다! 테스트 관련 리팩토링하는 일도 생각보다 훨씬 복잡하고 힘든 것 같네요!
너무 늦게 리뷰 작성해서 미안합니다..!

public FormIdDto createForm(FormCreateDto request, LoginUserDto loginUser) {
log.debug("Create Form: contents: {}, loginUser: {}", request, loginUser.id());

return formCreateService.execute(request, loginUser);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

execute에서 리턴을 받은 후 formResponseMapper로 변환하는 것이 어떠신가요?

@@ -0,0 +1,16 @@
package com.formssafe.util;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Assertion을 util로 빼놓은 점이 참신하고 좋네요! 계속 반복코드 작성해서 힘들었는데 인싸이트 배워갑니다~

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