diff --git a/src/test/java/es/princip/getp/fixture/client/ClientFixture.java b/src/test/java/es/princip/getp/fixture/client/ClientFixture.java index a01129b9..55436051 100644 --- a/src/test/java/es/princip/getp/fixture/client/ClientFixture.java +++ b/src/test/java/es/princip/getp/fixture/client/ClientFixture.java @@ -1,26 +1,20 @@ package es.princip.getp.fixture.client; import es.princip.getp.domain.client.model.Client; +import es.princip.getp.domain.member.model.MemberId; -import java.util.List; -import java.util.stream.LongStream; - +import static es.princip.getp.fixture.client.AddressFixture.address; +import static es.princip.getp.fixture.client.BankAccountFixture.bankAccount; import static es.princip.getp.fixture.common.EmailFixture.email; public class ClientFixture { - public static Client client(final Long memberId) { + public static Client client(final MemberId memberId) { return Client.builder() .memberId(memberId) .email(email()) - .address(AddressFixture.address()) - .bankAccount(BankAccountFixture.bankAccount()) + .address(address()) + .bankAccount(bankAccount()) .build(); } - - public static List clientList(final int size, final Long memberIdBias) { - return LongStream.range(0, size) - .mapToObj(i -> client(memberIdBias + i)) - .toList(); - } } diff --git a/src/test/java/es/princip/getp/fixture/member/MemberFixture.java b/src/test/java/es/princip/getp/fixture/member/MemberFixture.java index 08f8eaf9..620d82e1 100644 --- a/src/test/java/es/princip/getp/fixture/member/MemberFixture.java +++ b/src/test/java/es/princip/getp/fixture/member/MemberFixture.java @@ -1,12 +1,8 @@ package es.princip.getp.fixture.member; -import es.princip.getp.domain.common.model.Email; import es.princip.getp.domain.member.model.Member; import es.princip.getp.domain.member.model.MemberType; -import java.util.List; -import java.util.stream.IntStream; - import static es.princip.getp.fixture.common.EmailFixture.email; public class MemberFixture { @@ -14,10 +10,4 @@ public class MemberFixture { public static Member member(final MemberType memberType) { return Member.of(email(), PasswordFixture.password(), memberType); } - - public static List memberList(final int size, final int bias, final MemberType memberType) { - return IntStream.range(bias, bias + size) - .mapToObj(i -> Member.of(Email.from("test" + i + "@example.com"), PasswordFixture.password(), memberType)) - .toList(); - } } diff --git a/src/test/java/es/princip/getp/fixture/member/ProfileImageFixture.java b/src/test/java/es/princip/getp/fixture/member/ProfileImageFixture.java index 636b3b4e..6b1c7f11 100644 --- a/src/test/java/es/princip/getp/fixture/member/ProfileImageFixture.java +++ b/src/test/java/es/princip/getp/fixture/member/ProfileImageFixture.java @@ -1,5 +1,6 @@ package es.princip.getp.fixture.member; +import es.princip.getp.domain.member.model.MemberId; import es.princip.getp.domain.member.model.ProfileImage; import java.net.URI; @@ -10,8 +11,8 @@ public class ProfileImageFixture { private static final String FILE_NAME = "image.jpg"; - public static ProfileImage profileImage(final Long memberId) { - final String profileImageUri = String.format("/images/%d/profile/%s", memberId, FILE_NAME); + public static ProfileImage profileImage(final MemberId memberId) { + final String profileImageUri = String.format("/images/%d/profile/%s", memberId.getValue(), FILE_NAME); final URI uri = URI.create(BASE_URI).resolve(profileImageUri); return ProfileImage.from(uri.toString()); } diff --git a/src/test/java/es/princip/getp/fixture/people/PeopleFixture.java b/src/test/java/es/princip/getp/fixture/people/PeopleFixture.java index 33b57a77..651ccaea 100644 --- a/src/test/java/es/princip/getp/fixture/people/PeopleFixture.java +++ b/src/test/java/es/princip/getp/fixture/people/PeopleFixture.java @@ -1,13 +1,11 @@ package es.princip.getp.fixture.people; +import es.princip.getp.domain.member.model.MemberId; import es.princip.getp.domain.people.model.People; import es.princip.getp.domain.people.model.PeopleInfo; import es.princip.getp.domain.people.model.PeopleProfileData; import es.princip.getp.domain.people.model.PeopleType; -import java.util.List; -import java.util.stream.LongStream; - import static es.princip.getp.fixture.common.EmailFixture.email; import static es.princip.getp.fixture.common.HashtagFixture.hashtags; import static es.princip.getp.fixture.common.TechStackFixture.techStacks; @@ -22,7 +20,7 @@ private static PeopleInfo peopleInfo(final PeopleType peopleType) { return new PeopleInfo(email(), peopleType); } - public static People people(Long memberId, PeopleType peopleType) { + public static People people(final MemberId memberId, final PeopleType peopleType) { final People people = People.of(memberId, peopleInfo(peopleType)); final PeopleProfileData data = new PeopleProfileData( introduction(), @@ -36,13 +34,7 @@ public static People people(Long memberId, PeopleType peopleType) { return people; } - public static People peopleWithoutProfile(Long memberId, PeopleType peopleType) { + public static People peopleWithoutProfile(final MemberId memberId, final PeopleType peopleType) { return People.of(memberId, peopleInfo(peopleType)); } - - public static List peopleList(int size, Long memberIdBias, PeopleType peopleType) { - return LongStream.range(0, size) - .mapToObj(i -> people(memberIdBias + i, peopleType)) - .toList(); - } }