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

Feature/#45 이메일 찾기 #60

Closed
wants to merge 6 commits into from

Conversation

hoon25
Copy link
Contributor

@hoon25 hoon25 commented Aug 2, 2022

Related Issues

To Do List

  • 사용자는 이름,핸드폰번호를 통해 이메일을 찾을 수 있다.

Detail To Do List

  • 이름과 핸드폰이 일치하면 이메일을 반환한다.

Description

이메일 찾기 기능 구현

변경 사항

변경 사항들을 적어주세요

질문 사항

질문 사항들을 적어주세요

기타

그 외로 적고 싶은 내용을 적어주세요

(Optaionl) 어떻게 테스트하셨나요?

@hoon25 hoon25 added Type: Feature 기능 개발 Status: In Progress 현재 처리 중인 이슈 labels Aug 2, 2022
@hoon25 hoon25 added this to the [UseCases] 사용자 - 인증 milestone Aug 2, 2022
@hoon25 hoon25 linked an issue Aug 2, 2022 that may be closed by this pull request
1 task
@hoon25 hoon25 added Status: Reviewing 리뷰 중인 이슈 and removed Status: In Progress 현재 처리 중인 이슈 labels Aug 3, 2022
Comment on lines +124 to +127
BDDMockito.given(userRepository.selectUserByNameAndPhoneNumber(findEmailRequestDTO.getName(), findEmailRequestDTO.getPhoneNumber()))
.willReturn(Optional.of(user));
// when, then
assertThat(userServiceImpl.findEmailByNameAndPhoneNumber(findEmailRequestDTO).getEmail()).isEqualTo(UserFixture.EMAIL);
Copy link
Collaborator

Choose a reason for hiding this comment

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

given when then 의 역할에 맞게 나누면 이런식으로 테스트 코드를 짜는것이 좋습니다.

//given
given(userRepository.selectByNameAndPhoneNumber(any(), any())).willReturn(Optional.of(user)) ;

//when
User actual = userServiceImpl.findEmailByNameAndPhoneNumber(findEmailRequestDTO);

//then
assertThat(actual.getEmail()).isEqualTo(UserFixture.EMAIL);
then(userRepository).should().selectUserByNameAndPhoneNumber(findEmailRequestDTO.getName(), findEmailRequestDTO.getPhoneNumber());

@memoer memoer deleted the branch feature/#35_master_temp September 15, 2022 18:27
@memoer memoer closed this Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewing 리뷰 중인 이슈 Type: Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[인증] 유저 아이디 찾기
3 participants