示例#1
0
        public void DeleteElementSuccess()
        {
            //Arrange
            Todo.TodoElements.Clear();

            var testTodoData  = new ToDoElement(1, "test", "testContent");
            var testTodoData2 = new ToDoElement(2, "test1", "testContent");
            var dataToDelete  = new ToDoElement(3, "test2", "testContent");

            Todo.TodoElements.Add(testTodoData);
            Todo.TodoElements.Add(testTodoData2);
            Todo.TodoElements.Add(dataToDelete);

            var expectedTodo = new List <ToDoElement>()
            {
                testTodoData, testTodoData2
            };

            //Act
            _controller.RemoveTaskFromList(3);

            //Assert
            Assert.Equal(expectedTodo, Todo.TodoElements);
        }