|
@ -39,6 +39,25 @@ public class BirthdateTest extends TestCase { |
|
|
boolean expectedResult = false; |
|
|
boolean expectedResult = false; |
|
|
boolean gotResult = birthdate.isValid(0, 0, 0); |
|
|
boolean gotResult = birthdate.isValid(0, 0, 0); |
|
|
assertEquals(expectedResult, gotResult); |
|
|
assertEquals(expectedResult, gotResult); |
|
|
|
|
|
|
|
|
|
|
|
gotResult = birthdate.isValid(32, 13, 1990); |
|
|
|
|
|
assertEquals(expectedResult, gotResult); |
|
|
|
|
|
|
|
|
|
|
|
gotResult = birthdate.isValid(31, 0, 1980); |
|
|
|
|
|
assertEquals(expectedResult, gotResult); |
|
|
|
|
|
|
|
|
|
|
|
gotResult = birthdate.isValid(31, 13, 1980); |
|
|
|
|
|
assertEquals(expectedResult, gotResult); |
|
|
|
|
|
|
|
|
|
|
|
gotResult = birthdate.isValid(1, 1, 3000); |
|
|
|
|
|
assertEquals(expectedResult, gotResult); |
|
|
|
|
|
|
|
|
|
|
|
gotResult = birthdate.isValid(1, 1, 1900); |
|
|
|
|
|
assertEquals(expectedResult, gotResult); |
|
|
|
|
|
|
|
|
|
|
|
expectedResult = true; |
|
|
|
|
|
gotResult = birthdate.isValid(1, 5, 2020); |
|
|
|
|
|
assertEquals(expectedResult, gotResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |