Skip to content

Commit

Permalink
[TDD 3단계] REFACTORING : 테스트 통과를 유지하며(초록 불을 유지하며), 구현 코드를 개선한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimyubi committed May 29, 2023
1 parent 5597e26 commit 2be753d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/study/unit/CafeKiosk.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public Order createOrder(LocalDateTime now){
}

public int calculateTotalPrice() {
return 8500;
int totalPrice = 0;
for(Beverage beverage: beverageList){
totalPrice += beverage.getPrice();;
}
return totalPrice;
}
}

0 comments on commit 2be753d

Please sign in to comment.