Created
November 21, 2021 23:05
-
-
Save bartubozkurt/7368829b7d49611b5c21e7629203813c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LeapYearTests { | |
private final LeapYear leapYear = new LeapYear(); | |
@Test | |
public void divisibleBy4_notDivisibleBy100() { | |
boolean leap = leapYear.isLeapYear(2016); | |
assertTrue(leap); | |
} | |
@Test | |
public void divisibleBy4_100_400() { | |
boolean leap = leapYear.isLeapYear(2000); | |
assertTrue(leap); | |
} | |
@Test | |
public void notDivisibleBy4() { | |
boolean leap = leapYear.isLeapYear(39); | |
assertFalse(leap); | |
} | |
@Test | |
public void divisibleBy4_and_100_not_400() { | |
boolean leap = leapYear.isLeapYear(1900); | |
assertFalse(leap); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment