public void ClearToDoTest() { //Arrange ToDoItems toDoItems = new ToDoItems(); int expected = 0; //Act toDoItems.ClearToDo(); int arraySize = toDoItems.Size(); //Assert Assert.Equal(arraySize, expected); }
public void AddNewItemToArrayTest() { //Arrange ToDoItems toDoItems = new ToDoItems(); string description = "Learn to code"; int toDoId = 1; //Act toDoItems.ClearToDo(); TodoSequencer.ResetID(); ToDo result = toDoItems.AddNewToDo(toDoId, description); //Assert Assert.NotNull(result); Assert.Contains(toDoId.ToString(), result.ToDoInformation()); Assert.Contains(description, result.ToDoInformation()); }