@Test(expected = IllegalStateException.class) public void 쿠폰할인적용시_쿠폰기간만료했을경우() { final double amount = 10D; final Coupon coupon = buildCoupon(amount, -10); coupon.apply(); }
public void apply() { verifyCouponIsAvailable(); this.used = true; }
Coupon { public void apply() { verifyCouponIsAvailable(); this.used = true; } }
Coupon { public void apply() { verifyCouponIsAvailable(); this.used = true; } @Builder  Coupon(double amount, LocalDate expirationDate); }
Coupon { public void apply() { verifyCouponIsAvailable(); this.used = true; } @Builder  Coupon(double amount, LocalDate expirationDate); boolean isExpiration(); void apply(); }
Coupon { public void apply() { verifyCouponIsAvailable(); this.used = true; } @Builder  Coupon(double amount, LocalDate expirationDate); boolean isExpiration(); void apply();  }