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

DocsServiceTest 테스트코드 리팩토링 #91

Merged
merged 7 commits into from
Apr 24, 2024
Merged

DocsServiceTest 테스트코드 리팩토링 #91

merged 7 commits into from
Apr 24, 2024

Conversation

hw9402
Copy link
Contributor

@hw9402 hw9402 commented Apr 23, 2024

🔨 Describe

CommandDocsServiceTest, QueryDocsServiceTest를 리팩토링 했습니다

  • @Test@RepeatedTest(REPEAT_COUNT) 중 후자를 선택했습니다. FIxture Monkey의 장점 중 하나인 엣지 케이스를 찾기 위함입니다.
  • FixtureGenerator 클래스로 따로 빼서 정적 메서드로 사용하도록 했습니다. @Autowired를 사용해서 굳이 주입을 하지 않고 코드의 재사용성을 높이기 위함입니다.

✅ Tasks

  • @RepeatedTest(REPEAT_COUNT)로 통일하기
  • FixtureGenerator 클래스로 Fixture 생성하는 코드 대체하기

@hw9402 hw9402 linked an issue Apr 23, 2024 that may be closed by this pull request
@hw9402 hw9402 added the 🔨 Refactor There is something to refactor label Apr 23, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
27.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link
Member

@NameIsUser06 NameIsUser06 left a comment

Choose a reason for hiding this comment

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

javaGetter를 사용하니까 엄청 깔끔하네요!
수고하셨습니다~

@qlido qlido merged commit 6b2650f into master Apr 24, 2024
2 of 3 checks passed
@qlido qlido deleted the refactor/#90 branch April 24, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 Refactor There is something to refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DocsServiceTest 리팩토링
3 participants