-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Member Email 값 객체를 SocialId 값 객체로 변경 (#196)
* refactor: Member Email 값 객체를 SocialId 로 변경 * refactor: Member 의 SocialId 컬럼명 수정
- Loading branch information
Showing
30 changed files
with
195 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
import org.junit.jupiter.api.Test; | ||
import touch.baton.domain.member.exception.MemberDomainException; | ||
import touch.baton.domain.member.vo.Company; | ||
import touch.baton.domain.member.vo.Email; | ||
import touch.baton.domain.member.vo.SocialId; | ||
import touch.baton.domain.member.vo.GithubUrl; | ||
import touch.baton.domain.member.vo.ImageUrl; | ||
import touch.baton.domain.member.vo.MemberName; | ||
|
@@ -25,7 +25,7 @@ class Create { | |
void success() { | ||
assertThatCode(() -> Member.builder() | ||
.memberName(new MemberName("헤에디주")) | ||
.email(new Email("[email protected]")) | ||
.socialId(new SocialId("testSocialId")) | ||
.oauthId(new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j")) | ||
.githubUrl(new GithubUrl("github.com/hyena0608")) | ||
.company(new Company("우아한형제들")) | ||
|
@@ -39,7 +39,7 @@ void success() { | |
void fail_if_name_is_null() { | ||
assertThatThrownBy(() -> Member.builder() | ||
.memberName(null) | ||
.email(new Email("[email protected]")) | ||
.socialId(new SocialId("testSocialId")) | ||
.oauthId(new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j")) | ||
.githubUrl(new GithubUrl("github.com/hyena0608")) | ||
.company(new Company("우아한형제들")) | ||
|
@@ -49,27 +49,27 @@ void fail_if_name_is_null() { | |
.hasMessage("Member 의 name 은 null 일 수 없습니다."); | ||
} | ||
|
||
@DisplayName("이메일에 null 이 들어갈 경우 예외가 발생한다.") | ||
@DisplayName("socialId에 null 이 들어갈 경우 예외가 발생한다.") | ||
@Test | ||
void fail_if_email_is_null() { | ||
void fail_if_socialId_is_null() { | ||
assertThatThrownBy(() -> Member.builder() | ||
.memberName(new MemberName("에단")) | ||
.email(null) | ||
.socialId(null) | ||
.oauthId(new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j")) | ||
.githubUrl(new GithubUrl("github.com/hyena0608")) | ||
.company(new Company("우아한형제들")) | ||
.imageUrl(new ImageUrl("imageUrl")) | ||
.build() | ||
).isInstanceOf(MemberDomainException.class) | ||
.hasMessage("Member 의 email 은 null 일 수 없습니다."); | ||
.hasMessage("Member 의 socialId 은 null 일 수 없습니다."); | ||
} | ||
|
||
@DisplayName("oauth id 에 null 이 들어갈 경우 예외가 발생한다.") | ||
@Test | ||
void fail_if_oauth_id_is_null() { | ||
assertThatThrownBy(() -> Member.builder() | ||
.memberName(new MemberName("에단")) | ||
.email(new Email("[email protected]")) | ||
.socialId(new SocialId("testSocialId")) | ||
.oauthId(null) | ||
.githubUrl(new GithubUrl("github.com/hyena0608")) | ||
.company(new Company("우아한형제들")) | ||
|
@@ -84,7 +84,7 @@ void fail_if_oauth_id_is_null() { | |
void fail_if_github_url_is_null() { | ||
assertThatThrownBy(() -> Member.builder() | ||
.memberName(new MemberName("에단")) | ||
.email(new Email("[email protected]")) | ||
.socialId(new SocialId("testSocialId")) | ||
.oauthId(new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j")) | ||
.githubUrl(null) | ||
.company(new Company("우아한형제들")) | ||
|
@@ -99,7 +99,7 @@ void fail_if_github_url_is_null() { | |
void fail_if_company_is_null() { | ||
assertThatThrownBy(() -> Member.builder() | ||
.memberName(new MemberName("에단")) | ||
.email(new Email("[email protected]")) | ||
.socialId(new SocialId("testSocialId")) | ||
.oauthId(new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j")) | ||
.githubUrl(new GithubUrl("github.com/hyena0608")) | ||
.company(null) | ||
|
@@ -114,7 +114,7 @@ void fail_if_company_is_null() { | |
void fail_if_imageUrl_is_null() { | ||
assertThatThrownBy(() -> Member.builder() | ||
.memberName(new MemberName("에단")) | ||
.email(new Email("[email protected]")) | ||
.socialId(new SocialId("testSocialId")) | ||
.oauthId(new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j")) | ||
.githubUrl(new GithubUrl("github.com/hyena0608")) | ||
.company(new Company("우아한형제들")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
import touch.baton.domain.common.vo.TotalRating; | ||
import touch.baton.domain.member.Member; | ||
import touch.baton.domain.member.vo.Company; | ||
import touch.baton.domain.member.vo.Email; | ||
import touch.baton.domain.member.vo.SocialId; | ||
import touch.baton.domain.member.vo.GithubUrl; | ||
import touch.baton.domain.member.vo.ImageUrl; | ||
import touch.baton.domain.member.vo.MemberName; | ||
|
@@ -25,7 +25,7 @@ class Create { | |
|
||
private final Member member = Member.builder() | ||
.memberName(new MemberName("헤에디주")) | ||
.email(new Email("[email protected]")) | ||
.socialId(new SocialId("testSocialId")) | ||
.oauthId(new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j")) | ||
.githubUrl(new GithubUrl("github.com/hyena0608")) | ||
.company(new Company("우아한형제들")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
import touch.baton.domain.member.Member; | ||
import touch.baton.domain.member.repository.MemberRepository; | ||
import touch.baton.domain.member.vo.Company; | ||
import touch.baton.domain.member.vo.Email; | ||
import touch.baton.domain.member.vo.SocialId; | ||
import touch.baton.domain.member.vo.GithubUrl; | ||
import touch.baton.domain.member.vo.ImageUrl; | ||
import touch.baton.domain.member.vo.MemberName; | ||
|
@@ -25,7 +25,7 @@ | |
class RunnerRepositoryTest extends RepositoryTestConfig { | ||
|
||
private static final MemberName memberName = new MemberName("헤에디주"); | ||
private static final Email email = new Email("[email protected]"); | ||
private static final SocialId socialId = new SocialId("testSocialId"); | ||
private static final OauthId oauthId = new OauthId("dsigjh98gh230gn2oinv913bcuo23nqovbvu93b12voi3bc31j"); | ||
private static final GithubUrl githubUrl = new GithubUrl("github.com/hyena0608"); | ||
private static final Company company = new Company("우아한형제들"); | ||
|
@@ -45,7 +45,7 @@ class RunnerRepositoryTest extends RepositoryTestConfig { | |
void setUp() { | ||
final Member member = Member.builder() | ||
.memberName(memberName) | ||
.email(email) | ||
.socialId(socialId) | ||
.oauthId(oauthId) | ||
.githubUrl(githubUrl) | ||
.company(company) | ||
|
@@ -76,7 +76,7 @@ void findByIdJoinMember() { | |
() -> assertThat(actualMember.getId()).isNotNull(), | ||
() -> assertThat(actualMember.getMemberName()).isEqualTo(memberName), | ||
() -> assertThat(actualMember.getCompany()).isEqualTo(company), | ||
() -> assertThat(actualMember.getEmail()).isEqualTo(email), | ||
() -> assertThat(actualMember.getSocialId()).isEqualTo(socialId), | ||
() -> assertThat(actualMember.getOauthId()).isEqualTo(oauthId), | ||
() -> assertThat(actualMember.getGithubUrl()).isEqualTo(githubUrl) | ||
); | ||
|
Oops, something went wrong.