Exemplo n.º 1
0
        public void ClearToDoTest()
        {
            //Arrange

            ToDoItems toDoItems = new ToDoItems();
            int       expected  = 0;

            //Act
            toDoItems.ClearToDo();
            int arraySize = toDoItems.Size();

            //Assert
            Assert.Equal(arraySize, expected);
        }
Exemplo n.º 2
0
        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());
        }