An error occurred while loading the file. Please try again.
-
Jan Kožusznik authoredVerifiedaa9f1fd5
AgeCalculatorTest.java 428 B
package koz01.java02;
import static java.time.LocalDate.of;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class AgeCalculatorTest {
@Test
public void test() {
AgeCalculator ca = new AgeCalculator(of(1900, 2, 1));
assertEquals(1, ca.compute(of(1901, 2, 1)));
assertEquals(0, ca.compute(of(1901, 1, 31)));
assertEquals(1, ca.compute(of(1902, 1, 31)));
}
}