Skip to content

Commit

Permalink
만원을 납부하면 한달 뒤가 만료일 - #19
Browse files Browse the repository at this point in the history
가장 쉬운 것부터 테스트
  • Loading branch information
hou27 committed Jan 12, 2023
1 parent f38fdcd commit a2b5be0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

import static org.junit.jupiter.api.Assertions.assertEquals;

import java.time.LocalDate;
import org.junit.jupiter.api.Test;

public class ExpiryDateCalculatorTest {
@Test
void 만원_납부하면_한달_가_만료일이_됨() {
LocalDate billingDate = LocalDate.of(2019, 3, 1);
int payAmount = 10_000;

ExpiryDateCalculator cal = new ExpiryDateCalculator();
LocalDate expiryDate = cal.calculateExpiryDate(billingDate, payAmount);
assertEquals(LocalDate.of(2019, 4, 1), expiryDate);
}
}

0 comments on commit a2b5be0

Please sign in to comment.