Exemple #1
0
        static void Main(string[] args)
        {
            var holidays = EasterCalculator.EasterHolidays("2020");

            foreach (var holiday in holidays)
            {
                Console.WriteLine(holiday.ToLongDateString());
            }

            Console.ReadLine();
        }
 public void EasterHolidaysException()
 {
     Assert.Throws <FormatException>(() => EasterCalculator.EasterHolidays("not a year"));
 }
 public void EasterHolidays2020()
 {
     DateTime[] holidays2020 = { new DateTime(2020, 4, 9), new DateTime(2020, 4, 10), new DateTime(2020, 4, 12), new DateTime(2020, 4, 13) };
     Assert.AreEqual(holidays2020, EasterCalculator.EasterHolidays("2020"));
 }