public void InitializeEntries_InvalidFile_ReturnsEmptyList() { const string pathToTestFile = "NullOrEmptyFile.json"; var databaseAccessor = new DatabaseAccessor(pathToTestFile); Assert.AreEqual(new List <CalendarEntry>(), databaseAccessor.FetchEntries()); }
public void AddEntry_DateIsValid_AddsEntry() { var entriesBefore = _databaseAccessor.FetchEntries().Count; _calendar.AddEntry("10/10/20 15:15", "Test description", "d"); var entriesAfter = _databaseAccessor.FetchEntries().Count; Assert.Greater(entriesAfter, entriesBefore); }