Esempio n. 1
0
        public void IsLeapYear_DivisibleBy4ButNot100_ReturnsTrue(int year)
        {
            // Arrange & Act
            var result = LeapYears.IsLeapYear(year);

            // Assert
            Assert.True(result);
        }
Esempio n. 2
0
        public void IsLeapYear_NotDivisibleBy4_ReturnsFalse(int year)
        {
            // Arrange & Act
            var result = LeapYears.IsLeapYear(year);

            // Assert
            Assert.False(result);
        }
Esempio n. 3
0
 public void DivisibleByFourAndByOneHundredAndByFourHundredReturnsTrue(int year)
 {
     LeapYears.IsLeapYear(year).Should().Be(true);
 }
Esempio n. 4
0
 public void DivisibleByFourAndByOneHundredButNotByFourHundredReturnsFalse(int year)
 {
     LeapYears.IsLeapYear(year).Should().Be(false);
 }
Esempio n. 5
0
 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");
 }
Esempio n. 10
0
 public void IsLeapYear_ShouldThrowArgumentException_WhenYearIsZero()
 {
     Assert.That(() => LeapYears.IsLeapYear(0), Throws.ArgumentException);
 }
Esempio n. 11
0
        public void IsLeapYear_ShouldReturnFalse_WhenYearIsNegative(int number)
        {
            bool isLeap = LeapYears.IsLeapYear(number);

            Assert.That(isLeap, Is.False);
        }
Esempio n. 12
0
        public void IsLeapYear_ShouldReturntrue_WhenYearIsSecolarFour(int number)
        {
            bool isLeap = LeapYears.IsLeapYear(number);

            Assert.That(isLeap, Is.True);
        }