Skip to content

Commit

Permalink
[BE] fixture 에 static 키워드 적용 (#557)
Browse files Browse the repository at this point in the history
* test: static 적용

* refactor: 개행
  • Loading branch information
nayonsoso authored Sep 4, 2024
1 parent 33334b9 commit 6868638
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public class OptionGroupFixture {

public OptionGroup 선택지_그룹(long questionId) {
public static OptionGroup 선택지_그룹(long questionId) {
return new OptionGroup(questionId, 1, 2);
}
}
8 changes: 4 additions & 4 deletions backend/src/test/java/reviewme/fixture/OptionItemFixture.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
24 changes: 12 additions & 12 deletions backend/src/test/java/reviewme/fixture/QuestionFixture.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
12 changes: 6 additions & 6 deletions backend/src/test/java/reviewme/fixture/SectionFixture.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@

public class SectionFixture {

public Section 항상_보이는_섹션(List<Long> questionIds) {
return this.항상_보이는_섹션(questionIds, 1);
public static Section 항상_보이는_섹션(List<Long> questionIds) {
return 항상_보이는_섹션(questionIds, 1);
}

public Section 항상_보이는_섹션(List<Long> questionIds, int position) {
public static Section 항상_보이는_섹션(List<Long> questionIds, int position) {
return new Section(VisibleType.ALWAYS, questionIds, null, "섹션명", "머릿말", position);
}

public Section 조건부로_보이는_섹션(List<Long> questionIds, long onSelectedOptionId) {
return this.조건부로_보이는_섹션(questionIds, onSelectedOptionId, 1);
public static Section 조건부로_보이는_섹션(List<Long> questionIds, long onSelectedOptionId) {
return 조건부로_보이는_섹션(questionIds, onSelectedOptionId, 1);
}

public Section 조건부로_보이는_섹션(List<Long> questionIds, long onSelectedOptionId, int position) {
public static Section 조건부로_보이는_섹션(List<Long> questionIds, long onSelectedOptionId, int position) {
return new Section(VisibleType.CONDITIONAL, questionIds, onSelectedOptionId, "섹션명", "머릿말", position);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class TemplateFixture {

public Template 템플릿(List<Long> sectionIds) {
public static Template 템플릿(List<Long> sectionIds) {
return new Template(sectionIds);
}
}

0 comments on commit 6868638

Please sign in to comment.