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); }
public bool IsBirthday(DateTime date) { return(DateOfBirth.IsBirthday(date)); }