diff --git a/backend/src/test/java/reviewme/fixture/OptionGroupFixture.java b/backend/src/test/java/reviewme/fixture/OptionGroupFixture.java new file mode 100644 index 000000000..3399ba3ac --- /dev/null +++ b/backend/src/test/java/reviewme/fixture/OptionGroupFixture.java @@ -0,0 +1,10 @@ +package reviewme.fixture; + +import reviewme.question.domain.OptionGroup; + +public class OptionGroupFixture { + + public OptionGroup 선택지_그룹(long questionId) { + return new OptionGroup(questionId, 1, 2); + } +} diff --git a/backend/src/test/java/reviewme/fixture/OptionItemFixture.java b/backend/src/test/java/reviewme/fixture/OptionItemFixture.java new file mode 100644 index 000000000..59590d905 --- /dev/null +++ b/backend/src/test/java/reviewme/fixture/OptionItemFixture.java @@ -0,0 +1,15 @@ +package reviewme.fixture; + +import reviewme.question.domain.OptionItem; +import reviewme.question.domain.OptionType; + +public class OptionItemFixture { + + public OptionItem 선택지(long optionGroupId) { + return new OptionItem("선택지 본문", optionGroupId, 1, OptionType.CATEGORY); + } + + public OptionItem 선택지(long optionGroupId, int position) { + return new OptionItem("선택지 본문", optionGroupId, 1, OptionType.CATEGORY); + } +} diff --git a/backend/src/test/java/reviewme/fixture/QuestionFixture.java b/backend/src/test/java/reviewme/fixture/QuestionFixture.java new file mode 100644 index 000000000..472beba47 --- /dev/null +++ b/backend/src/test/java/reviewme/fixture/QuestionFixture.java @@ -0,0 +1,39 @@ +package reviewme.fixture; + +import reviewme.question.domain.Question; +import reviewme.question.domain.QuestionType; + +public class QuestionFixture { + + public Question 선택형_필수_질문() { + return this.선택형_필수_질문(1); + } + + public Question 선택형_필수_질문(int position) { + return new Question(true, QuestionType.CHECKBOX, "본문", null, position); + } + + public Question 선택형_옵션_질문() { + return this.선택형_옵션_질문(1); + } + + public Question 선택형_옵션_질문(int position) { + return new Question(false, QuestionType.CHECKBOX, "본문", null, position); + } + + public Question 서술형_필수_질문() { + return this.서술형_필수_질문(1); + } + + public Question 서술형_필수_질문(int position) { + return new Question(true, QuestionType.TEXT, "본문", null, position); + } + + public Question 서술형_옵션_질문() { + return this.서술형_옵션_질문(1); + } + + public Question 서술형_옵션_질문(int position) { + return new Question(false, QuestionType.TEXT, "본문", null, position); + } +} diff --git a/backend/src/test/java/reviewme/fixture/ReviewGroupFixture.java b/backend/src/test/java/reviewme/fixture/ReviewGroupFixture.java new file mode 100644 index 000000000..321b04dc0 --- /dev/null +++ b/backend/src/test/java/reviewme/fixture/ReviewGroupFixture.java @@ -0,0 +1,14 @@ +package reviewme.fixture; + +import reviewme.reviewgroup.domain.ReviewGroup; + +public class ReviewGroupFixture { + + public ReviewGroup 리뷰_그룹() { + return this.리뷰_그룹("reviewRequestCode", "groupAccessCode"); + } + + public ReviewGroup 리뷰_그룹(String reviewRequestCode, String groupAccessCode) { + return new ReviewGroup("revieweeName", "projectName", reviewRequestCode, groupAccessCode); + } +} diff --git a/backend/src/test/java/reviewme/fixture/SectionFixture.java b/backend/src/test/java/reviewme/fixture/SectionFixture.java new file mode 100644 index 000000000..458478790 --- /dev/null +++ b/backend/src/test/java/reviewme/fixture/SectionFixture.java @@ -0,0 +1,24 @@ +package reviewme.fixture; + +import java.util.List; +import reviewme.template.domain.Section; +import reviewme.template.domain.VisibleType; + +public class SectionFixture { + + public Section 항상_보이는_섹션(List questionIds) { + return this.항상_보이는_섹션(questionIds, 1); + } + + public Section 항상_보이는_섹션(List questionIds, int position) { + return new Section(VisibleType.ALWAYS, questionIds, null, "섹션명", "머릿말", position); + } + + public Section 조건부로_보이는_섹션(List questionIds, long onSelectedOptionId) { + return this.조건부로_보이는_섹션(questionIds, onSelectedOptionId, 1); + } + + public Section 조건부로_보이는_섹션(List questionIds, long onSelectedOptionId, int position) { + return new Section(VisibleType.CONDITIONAL, questionIds, onSelectedOptionId, "섹션명", "머릿말", position); + } +} diff --git a/backend/src/test/java/reviewme/fixture/TemplateFixture.java b/backend/src/test/java/reviewme/fixture/TemplateFixture.java new file mode 100644 index 000000000..808cc31b6 --- /dev/null +++ b/backend/src/test/java/reviewme/fixture/TemplateFixture.java @@ -0,0 +1,11 @@ +package reviewme.fixture; + +import java.util.List; +import reviewme.template.domain.Template; + +public class TemplateFixture { + + public Template 템플릿(List sectionIds) { + return new Template(sectionIds); + } +}