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

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

            Assert.True(result.Value != 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");
        }