public void GetAllItemsReturnsEmptyListWhenNoItemsArePresent() { var allItems = PoopingRepository.GetAll(); Assert.IsNotNull(allItems); Assert.AreEqual(0, allItems.Count()); }
public void AddingDeletingSearchingTest() { var guidToDelete = AddRandomPoopingToDb(); var guidToLookup = AddRandomPoopingToDb(); AddRandomPoopingToDb(); AddRandomPoopingToDb(); var allItems = PoopingRepository.GetAll(); Assert.AreEqual(4, allItems.Count()); Assert.IsNotNull(PoopingRepository.GetById(guidToLookup)); PoopingRepository.Delete(guidToDelete); allItems = PoopingRepository.GetAll(); Assert.AreEqual(3, allItems.Count()); Assert.IsNull(allItems.SingleOrDefault(p => p.Id == guidToDelete)); }