public void GetActiveFromEmptyReturnsNull() { var ToDoItem = new ToDoItem(" Groceries "); ToDoItem.MarkAsCompleted(); IToDoRepository repository2 = new ToDoRepository(); repository2.Add(ToDoItem); Assert.AreEqual(null, repository2.GetActive()); }
public void GetActiveReturnsAllActive() { List <ToDoItem> repository = new List <ToDoItem>(); var ToDoItem = new ToDoItem(" Groceries "); var ToDoItem2 = new ToDoItem(" Groceries 1"); ToDoItem2.MarkAsCompleted(); repository.Add(ToDoItem); IToDoRepository repository2 = new ToDoRepository(); repository2.Add(ToDoItem); repository2.Add(ToDoItem2); Assert.AreEqual(true, repository.SequenceEqual(repository2.GetActive())); }