Skip to content

Commit de8ee99

Browse files
committed
test: 고객 서비스 레이어 Mockito 테스트 추가
1 parent 6ca5617 commit de8ee99

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/java/com/programmers/springweekly/service/customer/CustomerServiceUnitTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import com.programmers.springweekly.domain.customer.Customer;
99
import com.programmers.springweekly.domain.customer.CustomerType;
10+
import com.programmers.springweekly.dto.customer.request.CustomerUpdateRequest;
1011
import com.programmers.springweekly.repository.customer.CustomerRepository;
1112
import com.programmers.springweekly.service.CustomerService;
1213
import java.util.List;
@@ -27,6 +28,16 @@ public class CustomerServiceUnitTest {
2728
@InjectMocks
2829
CustomerService customerService;
2930

31+
@Test
32+
void update() {
33+
// given
34+
UUID uuid = UUID.randomUUID();
35+
Customer customer = new Customer(uuid, "changhyeon", "[email protected]", CustomerType.BLACKLIST);
36+
CustomerUpdateRequest customerUpdateRequest = new CustomerUpdateRequest(uuid, "changhyeon", "[email protected]", CustomerType.BLACKLIST);
37+
38+
willDoNothing().given(customerRepository).update(customer);
39+
}
40+
3041
@Test
3142
void findById() {
3243
// given

0 commit comments

Comments
 (0)