From 6868638adcf6d7ef7f2a4fede38cbd2672384779 Mon Sep 17 00:00:00 2001 From: Yeongseo Na Date: Wed, 4 Sep 2024 10:07:37 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20fixture=20=EC=97=90=20static=20=ED=82=A4?= =?UTF-8?q?=EC=9B=8C=EB=93=9C=20=EC=A0=81=EC=9A=A9=20(#557)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: static 적용 * refactor: 개행 --- .../reviewme/fixture/OptionGroupFixture.java | 2 +- .../reviewme/fixture/OptionItemFixture.java | 8 +++---- .../reviewme/fixture/QuestionFixture.java | 24 +++++++++---------- .../reviewme/fixture/ReviewGroupFixture.java | 6 ++--- .../java/reviewme/fixture/SectionFixture.java | 12 +++++----- .../reviewme/fixture/TemplateFixture.java | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/backend/src/test/java/reviewme/fixture/OptionGroupFixture.java b/backend/src/test/java/reviewme/fixture/OptionGroupFixture.java index 3399ba3ac..259a3ebcf 100644 --- a/backend/src/test/java/reviewme/fixture/OptionGroupFixture.java +++ b/backend/src/test/java/reviewme/fixture/OptionGroupFixture.java @@ -4,7 +4,7 @@ public class OptionGroupFixture { - public OptionGroup 선택지_그룹(long questionId) { + public static 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 index 59590d905..3b7e50725 100644 --- a/backend/src/test/java/reviewme/fixture/OptionItemFixture.java +++ b/backend/src/test/java/reviewme/fixture/OptionItemFixture.java @@ -5,11 +5,11 @@ public class OptionItemFixture { - public OptionItem 선택지(long optionGroupId) { - return new OptionItem("선택지 본문", optionGroupId, 1, OptionType.CATEGORY); + public static OptionItem 선택지(long optionGroupId) { + return 선택지(optionGroupId, 1); } - public OptionItem 선택지(long optionGroupId, int position) { - return new OptionItem("선택지 본문", optionGroupId, 1, OptionType.CATEGORY); + public static OptionItem 선택지(long optionGroupId, int position) { + return new OptionItem("선택지 본문", optionGroupId, position, OptionType.CATEGORY); } } diff --git a/backend/src/test/java/reviewme/fixture/QuestionFixture.java b/backend/src/test/java/reviewme/fixture/QuestionFixture.java index 472beba47..f4ce28b88 100644 --- a/backend/src/test/java/reviewme/fixture/QuestionFixture.java +++ b/backend/src/test/java/reviewme/fixture/QuestionFixture.java @@ -5,35 +5,35 @@ public class QuestionFixture { - public Question 선택형_필수_질문() { - return this.선택형_필수_질문(1); + public static Question 선택형_필수_질문() { + return 선택형_필수_질문(1); } - public Question 선택형_필수_질문(int position) { + public static Question 선택형_필수_질문(int position) { return new Question(true, QuestionType.CHECKBOX, "본문", null, position); } - public Question 선택형_옵션_질문() { - return this.선택형_옵션_질문(1); + public static Question 선택형_옵션_질문() { + return 선택형_옵션_질문(1); } - public Question 선택형_옵션_질문(int position) { + public static Question 선택형_옵션_질문(int position) { return new Question(false, QuestionType.CHECKBOX, "본문", null, position); } - public Question 서술형_필수_질문() { - return this.서술형_필수_질문(1); + public static Question 서술형_필수_질문() { + return 서술형_필수_질문(1); } - public Question 서술형_필수_질문(int position) { + public static Question 서술형_필수_질문(int position) { return new Question(true, QuestionType.TEXT, "본문", null, position); } - public Question 서술형_옵션_질문() { - return this.서술형_옵션_질문(1); + public static Question 서술형_옵션_질문() { + return 서술형_옵션_질문(1); } - public Question 서술형_옵션_질문(int position) { + public static 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 index 321b04dc0..5ae84fe0d 100644 --- a/backend/src/test/java/reviewme/fixture/ReviewGroupFixture.java +++ b/backend/src/test/java/reviewme/fixture/ReviewGroupFixture.java @@ -4,11 +4,11 @@ public class ReviewGroupFixture { - public ReviewGroup 리뷰_그룹() { - return this.리뷰_그룹("reviewRequestCode", "groupAccessCode"); + public static ReviewGroup 리뷰_그룹() { + return 리뷰_그룹("reviewRequestCode", "groupAccessCode"); } - public ReviewGroup 리뷰_그룹(String reviewRequestCode, String groupAccessCode) { + public static 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 index 458478790..ce8d5d906 100644 --- a/backend/src/test/java/reviewme/fixture/SectionFixture.java +++ b/backend/src/test/java/reviewme/fixture/SectionFixture.java @@ -6,19 +6,19 @@ public class SectionFixture { - public Section 항상_보이는_섹션(List questionIds) { - return this.항상_보이는_섹션(questionIds, 1); + public static Section 항상_보이는_섹션(List questionIds) { + return 항상_보이는_섹션(questionIds, 1); } - public Section 항상_보이는_섹션(List questionIds, int position) { + public static 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 static Section 조건부로_보이는_섹션(List questionIds, long onSelectedOptionId) { + return 조건부로_보이는_섹션(questionIds, onSelectedOptionId, 1); } - public Section 조건부로_보이는_섹션(List questionIds, long onSelectedOptionId, int position) { + public static 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 index 808cc31b6..44826daee 100644 --- a/backend/src/test/java/reviewme/fixture/TemplateFixture.java +++ b/backend/src/test/java/reviewme/fixture/TemplateFixture.java @@ -5,7 +5,7 @@ public class TemplateFixture { - public Template 템플릿(List sectionIds) { + public static Template 템플릿(List sectionIds) { return new Template(sectionIds); } }