public void NoBirthday(int month, int day)
        {
            var dateOfBirth = new DateOfBirth(11, 8);
            var isBirthday  = dateOfBirth.IsBirthday(new DateTime(2020, month, day));

            Assert.False(isBirthday);
        }
        public void BornOnLeapYearAndCheckYesBirthdayOnLeapYear()
        {
            var dateOfBirth = new DateOfBirth(2, 29);
            var isBirthday  = dateOfBirth.IsBirthday(new DateTime(2020, 2, 29));

            Assert.True(isBirthday);
        }
        public void YesBirthday(int year)
        {
            var dateOfBirth = new DateOfBirth(11, 8);
            var isBirthday  = dateOfBirth.IsBirthday(new DateTime(year, 11, 8));

            Assert.True(isBirthday);
        }
Esempio n. 4
0
 public bool IsBirthday(DateTime date)
 {
     return(DateOfBirth.IsBirthday(date));
 }