예제 #1
0
        public void GetChristmasDayTest()
        {
            // arrange
            var expected = DateTime.Parse("12/25/2020");
            // act
            var actual = SpecialDateHelper.GetChristmasDay("2020");

            // assert
            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void GetDateCustomTests()
        {
            // arrange
            var holiday = new PaidHoliday(
                "Jason's Birthday",
                (string year) => SpecialDateHelper.GetChristmasDay(year).AddDays(-4));
            var expected = DateTime.Parse("12/21/2020");
            // act
            var actual = holiday.GetDate("2020");

            // assert
            Assert.Equal(expected, actual);
        }