Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the year: ");
            var year = int.Parse(Console.ReadLine() ?? string.Empty);

            Console.WriteLine($"Is year leap: {LeapYear.IsLeapYear(year)}");
        }
Beispiel #2
0
        public void IsLeapYear_ForNumberDivisibleByHundred_false()
        {
            // eventually your testing code will go here
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(false, testLeapYear.IsLeapYear(1900));
        }
Beispiel #3
0
        public void IsLeapYear_ForNumbersDivisibleByFour_isTrue()
        {
            //Test code goes here.
            LeapYear year = new LeapYear(); //instantiate a LeapYear object named year.

            Assert.Equal(true, year.IsLeapYearTrue(2012));
        }
Beispiel #4
0
        public void IsLeapYear_ForNumberDivisibleByFour_true()
        {
            // eventually your testing code will go here
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(true, testLeapYear.IsLeapYear(2016));
        }
 public void IsLeapYear_ForNumberDivisibleByFour_true()
 {
     LeapYear testLeapYear = new LeapYear();
       Assert.Equal(true, testLeapYear.IsLeapYear(2012));
 }
 public void IsLeapYear_ForMultiplesOfOneHundred_false()
 {
     LeapYear testLeapYear = new LeapYear();
       Assert.Equal(false, testLeapYear.IsLeapYear(1900));
 }
        public void IsLeapYear_ForNumberDivisibleByFour_true()
        {
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(true, testLeapYear.IsLeapYear(2012));
        }
        public void IsLeapYear_ForMultiplesOfFourHundred_true()
        {
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(true, testLeapYear.IsLeapYear(2000));
        }
        public void IsLeapYear_ForMultiplesOfOneHundred_false()
        {
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(false, testLeapYear.IsLeapYear(1900));
        }
        public void IsLeapYear_ForNumberNotDivisibleByFour_false()
        {
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(false, testLeapYear.IsLeapYear(1999));
        }
Beispiel #11
0
        public void IsLeapYear_MultiplesDivisibleByHundred_isFalse()
        {
            LeapYear year = new LeapYear();

            Assert.Equal(true, year.IsLeapYearTrue(1900));
        }
        public void IsLeapYear_ForNumberDivisibleByOneHundred_false()
        {
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(false, testLeapYear.IsLeapYear(1900));
        }
Beispiel #13
0
 public void NormalYearIsNotLeapYear()
 {
     Assert.False(LeapYear.IsLeapYear(1789));
 }
 public void IsLeapYear_ForNumberDivisibleByOneHundred_false()
 {
     LeapYear testLeapYear = new LeapYear();
       Assert.Equal(false, testLeapYear.IsLeapYear(1900));
 }
Beispiel #15
0
        public void IsLeapYear_MultipleOfFourHundred_isTrue()
        {
            LeapYear year = new LeapYear();

            Assert.Equal(true, year.IsLeapYearTrue(2000));
        }
Beispiel #16
0
        public void IsLeapYear_ForNumbersDivisibleByFour_isFalse()
        {
            LeapYear year = new LeapYear();

            Assert.Equal(false, year.IsLeapYearTrue(1999));
        }
 public void IsLeapYear_ForNumberNotDivisibleByFour_false()
 {
     LeapYear testLeapYear = new LeapYear();
       Assert.Equal(false, testLeapYear.IsLeapYear(1999));
 }
Beispiel #18
0
        public void IsLeapYear_ForYearDivisibleByFourHundred_true()
        {
            LeapYear testLeapYear = new LeapYear();

            Assert.Equal(true, testLeapYear.IsLeapYear(2000));
        }
 public void IsLeapYear_ForMultiplesOfFourHundred_true()
 {
     LeapYear testLeapYear = new LeapYear();
       Assert.Equal(true, testLeapYear.IsLeapYear(2000));
 }
 public void IsLeapYear_ForNumberDivisibleByFour_true()
 {
     //testing code here
     LeapYear LeapYear = new LeapYear();
     Assert.Equal(true, LeapYear.IsLeapYear(2012));
 }