public void Add_IncludesEntries_WhenWithinAllConstraints() { var fileSystem = CreateVirtualJournal(2019, 2020); var earliestDate = new LocalDate(); var readmeCollection = new ReadmeJournalEntryCollection(earliestDate, true); foreach (var filePath in fileSystem.AllFiles) { var reader = new JournalReader(fileSystem, filePath, BodyWrapWidth); readmeCollection.Add(reader); } readmeCollection.Should().HaveCount(fileSystem.TotalReadmeEntries); }
public void Add_IgnoresFutureEntries_WhenFutureEntriesAreExcluded() { var fileSystem = CreateVirtualJournal(2019, 2020); var earliestDate = new LocalDate(); var readmeCollection = new ReadmeJournalEntryCollection(earliestDate, false); foreach (var filePath in fileSystem.AllFiles) { var reader = new JournalReader(fileSystem, filePath, BodyWrapWidth); readmeCollection.Add(reader); } readmeCollection.Should().BeEmpty(); }