Skip to content

Commit 19a5abb

Browse files
committed
feat: Goal 생성자에 상태 필드 추가 및 초기화 로직 수정
1 parent 0db0f1d commit 19a5abb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/test/java/com/growit/app/fake/goal/GoalFixture.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class GoalBuilder {
9090
LocalDate thisMonday = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
9191
LocalDate thisSunday = today.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY));
9292

93+
private GoalStatus status = GoalStatus.PROGRESS;
9394
private GoalDuration duration = new GoalDuration(thisMonday, thisSunday);
9495
private String id = "goal-1";
9596
private String userId = "user-1";
@@ -117,7 +118,12 @@ public GoalBuilder duration(GoalDuration duration) {
117118
return this;
118119
}
119120

121+
public GoalBuilder status(GoalStatus status) {
122+
this.status = status;
123+
return this;
124+
}
125+
120126
public Goal build() {
121-
return Goal.create(id, userId, name, planet, duration, GoalStatus.PROGRESS);
127+
return Goal.create(id, userId, name, planet, duration, status);
122128
}
123129
}

0 commit comments

Comments
 (0)