Skip to content

Commit

Permalink
test: MemberFixture 이름 변경 DEFAULT_MEMBER -> TOUROOT_LOCAL_USER
Browse files Browse the repository at this point in the history
  • Loading branch information
Libienz committed Dec 5, 2024
1 parent 4b9730f commit d7ec90f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class LoginTestHelper {
private final MemberRepository memberRepository;

public Member initMemberTestData() {
Member member = MemberFixture.DEFAULT_MEMBER.getMember();
Member member = MemberFixture.TOUROOT_LOCAL_USER.getMember();
return memberRepository.save(member);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void setUp() {
@DisplayName("회원 가입을 한다.")
@Test
void createTravelogue() {
MemberRequest request = MemberFixture.DEFAULT_MEMBER.getCreateRequest();
MemberRequest request = MemberFixture.TOUROOT_LOCAL_USER.getCreateRequest();

RestAssured.given().log().all()
.contentType(ContentType.JSON)
Expand All @@ -54,7 +54,7 @@ void createTravelogue() {
@DisplayName("비어있는 이메일로 회원 가입하면 예외가 발생한다.")
@Test
void createTravelogueWithEmptyEmail() {
MemberRequest request = MemberFixture.DEFAULT_MEMBER.getCreateRequestWithEmail("");
MemberRequest request = MemberFixture.TOUROOT_LOCAL_USER.getCreateRequestWithEmail("");

RestAssured.given().log().all()
.contentType(ContentType.JSON)
Expand All @@ -69,7 +69,7 @@ void createTravelogueWithEmptyEmail() {
@ParameterizedTest
@ValueSource(strings = {"", "\t", "\n"})
void createTravelogueWithEmptyPassword(String emptyPassword) {
MemberRequest request = MemberFixture.DEFAULT_MEMBER.getCreateRequestWithPassword(emptyPassword);
MemberRequest request = MemberFixture.TOUROOT_LOCAL_USER.getCreateRequestWithPassword(emptyPassword);

RestAssured.given().log().all()
.contentType(ContentType.JSON)
Expand All @@ -84,7 +84,7 @@ void createTravelogueWithEmptyPassword(String emptyPassword) {
@ParameterizedTest
@ValueSource(strings = {"", "\t", "\n"})
void createTravelogueWithEmptyNickname(String emptyNickname) {
MemberRequest request = MemberFixture.DEFAULT_MEMBER.getCreateRequestWithNickname(emptyNickname);
MemberRequest request = MemberFixture.TOUROOT_LOCAL_USER.getCreateRequestWithNickname(emptyNickname);

RestAssured.given().log().all()
.contentType(ContentType.JSON)
Expand All @@ -99,7 +99,8 @@ void createTravelogueWithEmptyNickname(String emptyNickname) {
@ParameterizedTest
@ValueSource(strings = {"", "\t", "\n"})
void createTravelogueWithEmptyProfileImageUrl(String emptyProfileImageUrl) {
MemberRequest request = MemberFixture.DEFAULT_MEMBER.getCreateRequestWithProfileImageUrl(emptyProfileImageUrl);
MemberRequest request = MemberFixture.TOUROOT_LOCAL_USER.getCreateRequestWithProfileImageUrl(
emptyProfileImageUrl);

RestAssured.given().log().all()
.contentType(ContentType.JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum MemberFixture {
"리비",
LoginType.KAKAO
),
DEFAULT_MEMBER(
TOUROOT_LOCAL_USER(
null,
"[email protected]",
"password",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package kr.touroot.member.helper;

import static kr.touroot.member.fixture.MemberFixture.DEFAULT_MEMBER;
import static kr.touroot.member.fixture.MemberFixture.TOUROOT_LOCAL_USER;

import kr.touroot.member.domain.Member;
import kr.touroot.member.repository.MemberRepository;
Expand All @@ -18,7 +18,7 @@ public MemberTestHelper(MemberRepository memberRepository) {
}

public Member persistMember() {
Member member = DEFAULT_MEMBER.getMember();
Member member = TOUROOT_LOCAL_USER.getMember();
return memberRepository.save(member);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void getByIdNotExist() {
@DisplayName("정상적인 값을 가진 요청이 주어지면 회원을 생성한다.")
@Test
void createMember() {
MemberRequest request = MemberFixture.DEFAULT_MEMBER.getCreateRequest();
MemberRequest request = MemberFixture.TOUROOT_LOCAL_USER.getCreateRequest();

Long id = memberService.createMember(request);

Expand All @@ -99,7 +99,7 @@ void createMemberWithDuplicatedNickname() {
Member persistedMember = testHelper.persistMember();
String nonDuplicatedEmail = "noDuplicate" + persistedMember.getEmail();
String duplicatedNickname = persistedMember.getNickname();
MemberRequest request = MemberFixture.DEFAULT_MEMBER.getCreateRequestWithEmailAndNickname(
MemberRequest request = MemberFixture.TOUROOT_LOCAL_USER.getCreateRequestWithEmailAndNickname(
nonDuplicatedEmail,
duplicatedNickname
);
Expand Down

0 comments on commit d7ec90f

Please sign in to comment.