diff --git a/src/test/java/org/ktc2/cokaen/wouldyouin/_global/testdata/CommonData.java b/src/test/java/org/ktc2/cokaen/wouldyouin/_global/testdata/CommonData.java index 3112a3ba..08fcd4c1 100644 --- a/src/test/java/org/ktc2/cokaen/wouldyouin/_global/testdata/CommonData.java +++ b/src/test/java/org/ktc2/cokaen/wouldyouin/_global/testdata/CommonData.java @@ -1,6 +1,8 @@ package org.ktc2.cokaen.wouldyouin._global.testdata; import org.ktc2.cokaen.wouldyouin._common.api.SliceInfo; +import org.ktc2.cokaen.wouldyouin._global.testdata.CurationData.R.curation1; +import org.ktc2.cokaen.wouldyouin._global.testdata.MemberData.R.curator1; import org.ktc2.cokaen.wouldyouin._global.testdata.ReservationData.R.reservation1; import org.ktc2.cokaen.wouldyouin._global.testdata.ReviewData.R.review1; @@ -18,11 +20,21 @@ public static class curation { public static SliceInfo get() { return SliceInfo.builder() .sliceSize(10) - .lastId(301L) + .lastId(curation1.id) .build(); } } + public static class like { + + public static SliceInfo get() { + return SliceInfo.builder() + .sliceSize(2) + .lastId(curator1.id) + .build(); + } + } + public static class reservation { public static SliceInfo get() { diff --git a/src/test/java/org/ktc2/cokaen/wouldyouin/_global/testdata/LikeData.java b/src/test/java/org/ktc2/cokaen/wouldyouin/_global/testdata/LikeData.java new file mode 100644 index 00000000..581a87f2 --- /dev/null +++ b/src/test/java/org/ktc2/cokaen/wouldyouin/_global/testdata/LikeData.java @@ -0,0 +1,164 @@ +package org.ktc2.cokaen.wouldyouin._global.testdata; + +import java.util.List; +import org.ktc2.cokaen.wouldyouin.like.api.dto.LikeResponse; +import org.ktc2.cokaen.wouldyouin.like.api.dto.LikeSliceResponse; +import org.ktc2.cokaen.wouldyouin.like.persist.CuratorLike; +import org.ktc2.cokaen.wouldyouin.like.persist.HostLike; +import org.ktc2.cokaen.wouldyouin.member.persist.Curator; +import org.ktc2.cokaen.wouldyouin.member.persist.Host; +import org.ktc2.cokaen.wouldyouin.member.persist.Member; + +public class LikeData { + + public static class R { + public static class likeHost1 { + public static class byNormal1 { + public static class _Relation { + public static Host targetMember() { + return MemberData.host1.entity.get(); + } + public static Member member() { + return MemberData.normal1.entity.get(); + } + } + public static class response { + public static final Long id = MemberData.R.host1.id; + public static final String nickname = MemberData.R.host1.nickname; + public static final String intro = MemberData.R.host1.intro; + public static final List hashtags = MemberData.R.host1.hashtags; + public static final String profileImageUrl = MemberData.R.host1.profileImageUrl; + } + } + public static class byCurator1 { + public static class _Relation { + public static Host targetMember() { + return MemberData.host1.entity.get(); + } + public static Curator member() { + return MemberData.curator1.entity.get(); + } + } + public static class response { + public static final Long id = MemberData.R.host1.id; + public static final String nickname = MemberData.R.host1.nickname; + public static final String intro = MemberData.R.host1.intro; + public static final List hashtags = MemberData.R.host1.hashtags; + public static final String profileImageUrl = MemberData.R.host1.profileImageUrl; + } + } + } + public static class likeCurator1 { + public static class byNormal1 { + public static class _Relation { + public static Curator targetMember() { + return MemberData.curator1.entity.get(); + } + public static Member member() { + return MemberData.normal1.entity.get(); + } + } + public static class response { + public static final Long id = MemberData.R.curator1.id; + public static final String nickname = MemberData.R.curator1.nickname; + public static final String intro = MemberData.R.curator1.intro; + public static final List hashtags = MemberData.R.curator1.hashtags; + public static final String profileImageUrl = MemberData.R.curator1.profileImageUrl; + } + } + } + } + + public static class likeHost1 { + public static class byNormal1 { + public static class entity { + public static HostLike get() { + return HostLike.builder() + .targetMember(R.likeHost1.byNormal1._Relation.targetMember()) + .member(R.likeHost1.byNormal1._Relation.member()) + .build(); + } + } + public static class response { + public static LikeResponse get() { + return LikeResponse.builder() + .memberId(R.likeHost1.byNormal1.response.id) + .nickname(R.likeHost1.byNormal1.response.nickname) + .intro(R.likeHost1.byNormal1.response.intro) + .hashtags(R.likeHost1.byNormal1.response.hashtags) + .profileImageUrl(R.likeHost1.byNormal1.response.profileImageUrl) + .build(); + } + } + } + public static class byCurator1 { + public static class entity { + public static HostLike get() { + return HostLike.builder() + .targetMember(R.likeHost1.byCurator1._Relation.targetMember()) + .member(R.likeHost1.byCurator1._Relation.member()) + .build(); + } + } + public static class response { + public static LikeResponse get() { + return LikeResponse.builder() + .memberId(R.likeHost1.byCurator1.response.id) + .nickname(R.likeHost1.byCurator1.response.nickname) + .intro(R.likeHost1.byCurator1.response.intro) + .hashtags(R.likeHost1.byCurator1.response.hashtags) + .profileImageUrl(R.likeHost1.byCurator1.response.profileImageUrl) + .build(); + } + } + } + } + + public static class likeCurator1 { + public static class byNormal1 { + public static class entity { + public static CuratorLike get() { + return CuratorLike.builder() + .targetMember(R.likeCurator1.byNormal1._Relation.targetMember()) + .member(R.likeCurator1.byNormal1._Relation.member()) + .build(); + } + } + public static class response { + public static LikeResponse get() { + return LikeResponse.builder() + .memberId(R.likeCurator1.byNormal1.response.id) + .nickname(R.likeCurator1.byNormal1.response.nickname) + .intro(R.likeCurator1.byNormal1.response.intro) + .hashtags(R.likeCurator1.byNormal1.response.hashtags) + .profileImageUrl(R.likeCurator1.byNormal1.response.profileImageUrl) + .build(); + } + } + } + } + + public static class normal1LikeSliceResponse { + public static LikeSliceResponse get() { + return LikeSliceResponse.builder() + .likes(List.of( + LikeResponse.builder() + .memberId(R.likeHost1.byNormal1.response.id) + .nickname(R.likeHost1.byNormal1.response.nickname) + .intro(R.likeHost1.byNormal1.response.intro) + .hashtags(R.likeHost1.byNormal1.response.hashtags) + .profileImageUrl(R.likeHost1.byNormal1.response.profileImageUrl) + .build(), + LikeResponse.builder() + .memberId(R.likeCurator1.byNormal1.response.id) + .nickname(R.likeCurator1.byNormal1.response.nickname) + .intro(R.likeCurator1.byNormal1.response.intro) + .hashtags(R.likeCurator1.byNormal1.response.hashtags) + .profileImageUrl(R.likeCurator1.byNormal1.response.profileImageUrl) + .build() + )) + .sliceInfo(CommonData.sliceInfo.like.get()) + .build(); + } + } +}