public void IsLeapYear_UserInputInteger_True() { LeapYear testLeapYear = new LeapYear(); Assert.AreEqual(false, testLeapYear.IsLeapYear(-2012)); Assert.AreEqual(false, testLeapYear.IsLeapYear(0)); }
public void isLeapYearTestEvenlyDeviedBy400() { LeapYear target = new LeapYear(); bool result = target.IsLeapYear(2000); Assert.IsTrue(result); }
public void isLeapYearTestEvenlyDeviedBy100ButNotDeviedBy400() { LeapYear target = new LeapYear(); bool result = target.IsLeapYear(2200); Assert.IsFalse(result); }
public void TestLeapYearAndAdd() { int myAdd = DoSomeMath.Add(1900, 92); bool myLeapYearCheck = LeapYear.IsLeapYear(myAdd); Assert.IsTrue(myLeapYearCheck); }
static void Main() { Console.WriteLine("Please enter a year to see if it was/will be a leap year: "); int year = int.Parse(Console.ReadLine()); LeapYear myLeapYear = new LeapYear(); Console.WriteLine(myLeapYear.IsLeapYear(year)); }