public void GivenAnInvalidModel_WhenITryAndCreateATodoItem_ThenTheNewViewIsDisplayed()
        {
            var controller = new ListController(repository.Object);
            controller.ModelState.AddModelError("error","value");
            var result = controller.Create(new TodoViewModel()) as ViewResult;

            Assert.That(result, Is.Not.Null);
        }
 public void GivenATodoItem_WhenICreateIt_ThenItIsAddedToTheDatabase()
 {
     ListController controller = new ListController(repository.Object);
     controller.Create(new TodoViewModel());
     repository.Verify(r => r.Create(It.IsAny<Todo>()), Times.Once());
 }