public void Can_Get_Single_Birthday_For_Today() { //ARRANGE var mockedCsvListResponse = new MockBirthdayPersonListBuilder() .WithBirthdayOnDate(new DateTimeProvider().UtcNow) .Build(); csvReaderWrapperInterface.Setup(m => m.ReadFromBirthDayCsvFile()).Returns(mockedCsvListResponse); var getVirthdayPeopleDetailsProvider = new GetBirthdayPeopleDetailsResponseProvider(csvReaderWrapperInterface.Object); //ACT var result = getVirthdayPeopleDetailsProvider.GetBirthdaysForToday(); //ASSERT Assert.AreEqual(1, result.BirthdayPeopleList.Count); }
public void Can_Not_Get_Any_Birthdays_For_Today_When_List_Empty() { //ARRANGE var mockedCsvListResponse = new MockBirthdayPersonListBuilder() .Build(); csvReaderWrapperInterface.Setup(m => m.ReadFromBirthDayCsvFile()).Returns(mockedCsvListResponse); var getVirthdayPeopleDetailsProvider = new GetBirthdayPeopleDetailsResponseProvider(csvReaderWrapperInterface.Object); //ACT var result = getVirthdayPeopleDetailsProvider.GetBirthdaysForToday(); //ASSERT Assert.Zero(result.BirthdayPeopleList.Count); }
public void Can_Not_Get_Any_Birthdays_For_Today_When_List_Contains_Other_Dates() { //ARRANGE var mockedCsvListResponse = new MockBirthdayPersonListBuilder() .WithBirthdayOnDate(new DateTimeProvider().UtcNow.AddDays(2)) .WithBirthdayOnDate(new DateTimeProvider().UtcNow.AddDays(1)) .WithBirthdayOnDate(new DateTimeProvider().UtcNow.AddDays(4)) .WithBirthdayOnDate(new DateTimeProvider().UtcNow.AddDays(9)) .Build(); csvReaderWrapperInterface.Setup(m => m.ReadFromBirthDayCsvFile()).Returns(mockedCsvListResponse); var getVirthdayPeopleDetailsProvider = new GetBirthdayPeopleDetailsResponseProvider(csvReaderWrapperInterface.Object); //ACT var result = getVirthdayPeopleDetailsProvider.GetBirthdaysForToday(); //ASSERT Assert.Zero(result.BirthdayPeopleList.Count); }