public void UpdateThrows404WhenIdNotFound()
        {
            var todoRepository = TestHelpers.CreateMockRepository<ToDoItem>();
            var controller = new ToDoController(todoRepository);

            var item = new Web.Models.ToDoItem();
            Assert.Throws<HttpResponseException>(() => controller.PutToDo(item));
        }
        public void UpdateWorks()
        {
            var todoRepository = TestHelpers.CreateMockRepository<ToDoItem>();
            var controller = new ToDoController(todoRepository);

            var item = new Web.Models.ToDoItem();
            item.Title = "Test Title";
            item.Item = "Test Item";
            item = controller.PostToDo(item);

            item.Title = "Modded Title";
            item = controller.PutToDo(item);

            Assert.NotNull(item);
            Assert.Equal("Modded Title", item.Title);
        }