Skip to content

Commit

Permalink
[TEST] add more to user service
Browse files Browse the repository at this point in the history
  • Loading branch information
nogamsung committed Feb 3, 2024
1 parent 09b445e commit c71c6f1
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ContactServiceTest {
@Autowired private UserRepository userRepository;

@Test
@DisplayName("연락처 중복 검증을 한다.")
@DisplayName("연락처 중복 검증이 정상 작동한다")
void givenValid_whenValidateDuplicateContact_thenReturn() {
// given
String email = "tester@gabojait.com";
Expand All @@ -49,7 +49,7 @@ void givenValid_whenValidateDuplicateContact_thenReturn() {
}

@Test
@DisplayName("존재하는 연락처 중복 검증시 기존 연락처를 삭제한다.")
@DisplayName("존재하는 연락처 중복 검증시 기존 연락처 삭제가 정상 작동한다")
void givenExistingContact_whenValidateDuplicateContact_thenReturn() {
// given
Contact contact = createContact("tester@gabojait.com");
Expand All @@ -65,7 +65,7 @@ void givenExistingContact_whenValidateDuplicateContact_thenReturn() {
}

@Test
@DisplayName("회원가입된 연락처 중복 검증시 예외가 발생한다.")
@DisplayName("회원가입된 연락처 중복 검증시 예외가 발생한다")
void givenRegisteredContact_whenValidateDuplicateContact_thenThrow() {
// given
Contact contact = createContact("tester@gabojait.com");
Expand All @@ -81,7 +81,7 @@ void givenRegisteredContact_whenValidateDuplicateContact_thenThrow() {
}

@Test
@DisplayName("연락처 생성 요청시 연락처를 생성한다.")
@DisplayName("연락처를 생성이 정상 작동한다")
void givenValid_whenCreateContact_thenReturn() {
// given
ContactCreateRequest request = createValidContactCreateRequest();
Expand All @@ -98,7 +98,7 @@ void givenValid_whenCreateContact_thenReturn() {
}

@Test
@DisplayName("존재하는 연락처 생성 요청시 예외가 발생한다.")
@DisplayName("존재하는 연락처 생성 요청시 예외가 발생한다")
void givenExistingContact_whenCreateContact_thenThrow() {
// given
ContactCreateRequest request = createValidContactCreateRequest();
Expand All @@ -112,7 +112,7 @@ void givenExistingContact_whenCreateContact_thenThrow() {
}

@Test
@DisplayName("연락처 인증코드 확인 요청시 연락처를 인증한다.")
@DisplayName("연락처 인증코드 확인 요청시 연락처를 인증한다")
void givenValid_whenVerifyContact_thenReturn() {
// given
ContactVerifyRequest request = createValidContactVerifyRequest("000000");
Expand All @@ -132,7 +132,7 @@ void givenValid_whenVerifyContact_thenReturn() {
}

@Test
@DisplayName("틀린 인증코드로 연락처 인증코드 확인 요청시 예외가 발생한다.")
@DisplayName("잘못된 인증코드로 연락처 인증코드 확인 요청시 예외가 발생한다")
void givenInvalidVerificationCode_whenVerifyContact_thenThrow() {
// given
ContactVerifyRequest request = createValidContactVerifyRequest("000001");
Expand All @@ -148,7 +148,7 @@ void givenInvalidVerificationCode_whenVerifyContact_thenThrow() {
}

@Test
@DisplayName("존재하지 않은 연락처 인증 요청시 예외가 발생한다.")
@DisplayName("존재하지 않은 연락처 인증 요청시 예외가 발생한다")
void givenNonExistingContact_whenVerifyContact_thenThrow() {
// given
ContactVerifyRequest request = createValidContactVerifyRequest("000000");
Expand Down
Loading

0 comments on commit c71c6f1

Please sign in to comment.