g-market / b-shop-backend

0 stars 0 forks source link

test : OrderService 테스트 - [merged] #55

Closed halucinor closed 1 year ago

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:08

_Merges feature/orders_crud_test -> feature/orderscrud

작업 내용

image

image

issue #17

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:08

requested review from @rkdud1108

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:08

marked the checklist item 💯 테스트는 잘 통과했나요? as completed

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:08

marked the checklist item 🏗️ 빌드는 성공했나요? as completed

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:08

marked the checklist item 🧹 불필요한 코드는 제거했나요? as completed

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:09

marked the checklist item 💭 이슈는 등록했나요? as completed

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:09

marked the checklist item 🏷️ 라벨은 등록했나요? as completed

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 17:09

marked the checklist item 💻 git rebase를 사용했나요? as completed

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 5, 2023, 19:01

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 43

@SpringBootTest 대신에 @ExtendWith(MockitoExtension.class)를 사용하여 테스트를 진행하는게 더 좋을 것 같습니다.

@SpringBootTest는 직접 데이터베이스까지 영향을 끼치기에 단위테스트와는 다를 것 같습니다!

Reference

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 5, 2023, 19:01

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 88

테스트라 하더라도 ID를 다르게 부여하는 것이 좋을 것 같습니다.

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 5, 2023, 19:01

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 124

List<OrderItem> orderItemList = List.of(orderItem1, orderItem2); 

List 정적 메서드인 of를 사용하여 생성하는 것도 좋을 것 같아요ㅎ

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 19:05

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 88

복붙이슈가 있었네요...😅

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 19:08

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 124

add 로 하나씩 추가하는거 보다 훨씬 깔끔한거 같아요

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 19:15

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 43

changed this line in version 2 of the diff

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 19:15

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 88

changed this line in version 2 of the diff

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 19:15

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 124

changed this line in version 2 of the diff

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 5, 2023, 19:15

added 1 commit

Compare with previous version

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 5, 2023, 19:56

Commented on src/test/java/com/gabia/bshop/service/OrdersServiceTest.java line 124

추가적으로 List.of 의 불변성에 대해서 한번 보시면 좋을 것 같아 링크 남겨드려요.

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 5, 2023, 19:56

resolved all threads

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 5, 2023, 22:07

Summer 님 Merge가 들어가서 rebase 하시고 Merge 하시면 될 것 같아요!

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 6, 2023, 09:16

approved this merge request

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 6, 2023, 09:16

mentioned in commit e3686633ada0db35d491ef33f63b83df77424e35

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 6, 2023, 09:16

mentioned in commit 3ecd18a5f9af9f16777cabda489e6662b322d634