public void ListForDate_ReturnsEmpty_ForInvalidDateTime() { // Arrange var repository = Substitute.For <IDaysRepository>(); InformationFinder sut = CreateSut(repository); // Act IEnumerable <IDayForResponse> actual = sut.ListForDate("invalid"); // Assert Assert.Equal(0, actual.Count()); }
public void ListForDate_ReturnsDays_WhenCalled() { // Arrange var repository = Substitute.For <IDaysRepository>(); repository.FindByDate(Arg.Any <DateTime>()).Returns(CreateList); InformationFinder sut = CreateSut(repository); // Act IEnumerable <IDayForResponse> actual = sut.ListForDate("2000-01-01"); // Assert Assert.Equal(2, actual.Count()); }