Example #1
0
        public void EditTodo()
        {
            var todo = new Todo()
            {
                Id         = 1,
                Text       = "Text123",
                TodoListId = 1,
            };

            var result = _controller.EditTodo(todo) as ObjectResult;

            Assert.True(result != null, "result is null");
            Assert.True(((Todo)result.Value).Text == "Text123", "Text is not Text123");
            Assert.True(result.StatusCode == 200, "Status code is not OK");
        }