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

CategoryTemplateService 테스트 #658

Merged
merged 8 commits into from
Sep 21, 2024

Conversation

zangsu
Copy link
Contributor

@zangsu zangsu commented Sep 17, 2024

⚡️ 관련 이슈

close #645

📍주요 변경 사항

  • 실제 db 사용하도록 변경
  • 테스트 코드의 오류 수정

🎸기타

  • CategoryTemplateService 의 존재에 대해 이야기를 해 보면 좋을 것 같아요.
    • 우선 이슈에 글을 달아둘게요.

@zangsu zangsu added refactor 요구사항이 바뀌지 않은 변경사항 BE 백엔드 labels Sep 17, 2024
@zangsu zangsu added this to the 5차 스프린트🍗 milestone Sep 17, 2024
@zangsu zangsu self-assigned this Sep 17, 2024
Copy link
Contributor

@kyum-q kyum-q left a comment

Choose a reason for hiding this comment

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

수고했어요 짱수 간단한 코멘트 남겨뒀어요 ~

Copy link
Contributor

@jminkkk jminkkk left a comment

Choose a reason for hiding this comment

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

안녕하세요 짱수~!
수고하셨습니다 🔥
코멘트 남겼으니 확인 부탁드립니당

@@ -52,7 +55,7 @@ void deleteCategoryFailWithUnauthorized() {

@Test
@DisplayName("카테고리 삭제 실패: 이미 없는 카테고리")
void deleteCategoryFailWithNotExistCateory() {
void deleteCategoryFailWithNotExistCategory() {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Nested 로 변경해주는 건 어떨까요?

Copy link
Contributor

Choose a reason for hiding this comment

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

짱수가 작성한 코드는 아니지만 테스트 코드의 질을 높이기 위한 작업중이니까 의견 남기겠습니다!!
categoryService.deleteById에 대한 테스트인데 해당 테스트 코드는 deleteById가 정상적으로 동작한다는 가정하에 작성된 코드 같아요.
이미 없는 카테고리를 삭제하는 테스트보다는 애초에 없는 ID에 대한 삭제 테스트를 하는 건 어떤가요?
이전까지의 테스트 코드에서 했던 것처럼 notSavedId등을 활용해서요!

Copy link
Contributor

@HoeSeong123 HoeSeong123 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 짱수!!
메소드가 별로 없어서 간단하고 좋네요ㅎㅎ

@@ -52,7 +55,7 @@ void deleteCategoryFailWithUnauthorized() {

@Test
@DisplayName("카테고리 삭제 실패: 이미 없는 카테고리")
void deleteCategoryFailWithNotExistCateory() {
void deleteCategoryFailWithNotExistCategory() {
Copy link
Contributor

Choose a reason for hiding this comment

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

짱수가 작성한 코드는 아니지만 테스트 코드의 질을 높이기 위한 작업중이니까 의견 남기겠습니다!!
categoryService.deleteById에 대한 테스트인데 해당 테스트 코드는 deleteById가 정상적으로 동작한다는 가정하에 작성된 코드 같아요.
이미 없는 카테고리를 삭제하는 테스트보다는 애초에 없는 ID에 대한 삭제 테스트를 하는 건 어떤가요?
이전까지의 테스트 코드에서 했던 것처럼 notSavedId등을 활용해서요!

Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

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

짱수최고 👍

간단한 제안 남겼습니다.

Copy link
Contributor

@jminkkk jminkkk left a comment

Choose a reason for hiding this comment

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

장수 수고했어요
기념으로 장수 합시다 깔깔 최고 🔥

Copy link
Contributor

@HoeSeong123 HoeSeong123 left a comment

Choose a reason for hiding this comment

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

굿!! 고생하셨습니다.

Copy link
Contributor

@kyum-q kyum-q left a comment

Choose a reason for hiding this comment

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

짱 수 굿 ~!!!!

Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

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

고생많았어요 짱수!

@zeus6768 zeus6768 merged commit b2ca409 into dev/be Sep 21, 2024
5 checks passed
@zeus6768 zeus6768 deleted the test/645-category-template-service branch September 21, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 refactor 요구사항이 바뀌지 않은 변경사항
Projects
Status: Weekend Done
Development

Successfully merging this pull request may close these issues.

5 participants