public void IsLeapYear_DivisibleBy4ButNot100_ReturnsTrue(int year) { // Arrange & Act var result = LeapYears.IsLeapYear(year); // Assert Assert.True(result); }
public void IsLeapYear_NotDivisibleBy4_ReturnsFalse(int year) { // Arrange & Act var result = LeapYears.IsLeapYear(year); // Assert Assert.False(result); }
public void DivisibleByFourAndByOneHundredAndByFourHundredReturnsTrue(int year) { LeapYears.IsLeapYear(year).Should().Be(true); }
public void DivisibleByFourAndByOneHundredButNotByFourHundredReturnsFalse(int year) { LeapYears.IsLeapYear(year).Should().Be(false); }
public void NonDivisibleByFourReturnsFalse(int year) { LeapYears.IsLeapYear(year).Should().Be(false); }
public static void Year2013() { Assert.AreEqual(false, LeapYears.IsLeapYear(2013), "Year 2013"); }
public static void Year1234() { Assert.AreEqual(false, LeapYears.IsLeapYear(1234), "Year 1234"); }
public static void Year2000() { Assert.AreEqual(true, LeapYears.IsLeapYear(2000), "Year 2000"); }
public static void Year1984() { Assert.AreEqual(true, LeapYears.IsLeapYear(1984), "Year 1984"); }
public void IsLeapYear_ShouldThrowArgumentException_WhenYearIsZero() { Assert.That(() => LeapYears.IsLeapYear(0), Throws.ArgumentException); }
public void IsLeapYear_ShouldReturnFalse_WhenYearIsNegative(int number) { bool isLeap = LeapYears.IsLeapYear(number); Assert.That(isLeap, Is.False); }
public void IsLeapYear_ShouldReturntrue_WhenYearIsSecolarFour(int number) { bool isLeap = LeapYears.IsLeapYear(number); Assert.That(isLeap, Is.True); }