Skip to content

Commit

Permalink
[Weekly/11/TestData/Like] likeData 추가 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
lja3723 committed Nov 15, 2024
1 parent 64b8d11 commit a1c3cfd
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String> 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<String> 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<String> 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();
}
}
}

0 comments on commit a1c3cfd

Please sign in to comment.