public void DatabaseManager_AddEntry_ShouldWork() { try { ArchiveModel model = new ArchiveModel() { ID = new Random().Next(1000000), Path = "Bla", LastArchivingDate = DateTime.Now.AddDays(-1), ArchivingIntervalInHours = 41, }; DatabaseManager manager = new DatabaseManager(); manager.AddEnty(model); List <IArchiveModel> returnedModelList = manager.GetAllEntries(); Assert.AreEqual(1, returnedModelList.Count); IArchiveModel returnedModel = returnedModelList[0]; Assert.AreEqual(model.ID, returnedModel.ID); Assert.AreEqual(model.Path, returnedModel.Path); Assert.AreEqual(model.LastArchivingDate?.ToString("yyyy-MM-dd HH:mm:ss"), returnedModel.LastArchivingDate?.ToString("yyyy-MM-dd HH:mm:ss")); Assert.AreEqual(model.ArchivingIntervalInHours, returnedModel.ArchivingIntervalInHours); } finally { DisposeDataBase(); } }