Skip to content

Commit

Permalink
test: 프로덕션 코드 변경으로 인한 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
woosung1223 committed Jun 8, 2023
1 parent 1c3048b commit 18513c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cart.presentation;

import cart.exception.application.IllegalMemberException;
import cart.exception.presentation.NoProperStatusCodeException;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.DisplayNameGenerator;
Expand Down Expand Up @@ -32,6 +33,6 @@ void exceptionStatusMapping_exception() {
Exception exception = new Exception();
// when, then
assertThatThrownBy(() -> ExceptionStatusMapper.of(exception))
.isInstanceOf(IllegalStateException.class);
.isInstanceOf(NoProperStatusCodeException.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void addCartItems() throws Exception {
@DisplayName("장바구니 품목 수량을 변경할 수 있다")
void updateCartItemQuantity() throws Exception {
// given
CartItemQuantityRequest request = new CartItemQuantityRequest();
CartItemQuantityRequest request = new CartItemQuantityRequest(3L);
String body = objectMapper.writeValueAsString(request);
doNothing().when(cartItemService).updateQuantity(any(), any(), any());
// when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void getProductById() throws Exception {
@DisplayName("상품을 생성할 수 있다")
void createProduct() throws Exception {
// given
ProductRequest request = new ProductRequest("피자", 1000L, "", 5.0, false);
ProductRequest request = new ProductRequest("피자", 1000L, "https://", 5.0, false);
String body = objectMapper.writeValueAsString(request);
when(productService.createProduct(any())).thenReturn(1L);
// when
Expand All @@ -99,7 +99,7 @@ void createProduct() throws Exception {
@DisplayName("상품을 업데이트 할 수 있다")
void updateProduct() throws Exception {
// given
ProductRequest request = new ProductRequest("피자", 1000L, "", 5.0, false);
ProductRequest request = new ProductRequest("피자", 1000L, "https://", 5.0, false);
String body = objectMapper.writeValueAsString(request);
doNothing().when(productService).updateProduct(any(), any());
// when
Expand Down

0 comments on commit 18513c6

Please sign in to comment.