Skip to content

Commit

Permalink
feat/#399: checkOnBoarding 캡슐화
Browse files Browse the repository at this point in the history
  • Loading branch information
LJH098 committed Jul 17, 2024
1 parent bd43e83 commit 17bf677
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,9 @@ public void updateWeight(Double weight, Double targetWeight) {
this.weight = weight;
this.targetWeight = targetWeight;
}

public boolean checkOnBoarding() {
return this.getWeight() != null && this.getHeight() != null && this.getAge() != null
&& this.getActivity() != null && this.getGender() != null && this.getTargetWeight() != null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ private void validateAge(Integer age) {
@Override
public boolean checkOnBoarding(OnBoardingMemberQuery query) {
MemberEntity memberEntity = memberPort.query(query.memberId());
return memberEntity.getWeight() != null && memberEntity.getHeight() != null && memberEntity.getAge() != null
&& memberEntity.getActivity() != null && memberEntity.getGender() != null && memberEntity.getTargetWeight() != null;
return memberEntity.checkOnBoarding();
}
}

0 comments on commit 17bf677

Please sign in to comment.