public void ItShouldBeAnIEnumerable(IFixture fixture, DateTime date) { // Arrange var sut = new DaysInMonthEnumerator(date.Month, date.Year); // Act and Assert sut.Should().BeAssignableTo<IEnumerable<DateTime>>(); }
public void ItShouldReturnTheExpectedDays(DateTime date) { // Arrange var firstDayOfMonth = new DateTime(date.Year, date.Month, 1); var firstDayOfNextMonth = firstDayOfMonth.AddMonths(1); var expected = GetAllIndividualDaysBetween(firstDayOfMonth, firstDayOfNextMonth).ToArray(); var sut = new DaysInMonthEnumerator(date.Month, date.Year); // Act var result = sut.ToArray(); // Assert result.Should().Equal(expected); }