public void Index_Returns_All_Todoes_In_DB()
        {
            //Arrange
            var todoRepository = Mock.Create<Repository>();
            Mock.Arrange(() => todoRepository.GetAll()).
                Returns(new List<Todo>()
                {
                    new Todo
                    {
                        TodoId = 1,
                        Deadline = new DateTime(2016, 2, 25),
                        TaskName = "Test Task 1"
                    },
                    new Todo
                    {
                        TodoId = 2,
                        Deadline = new DateTime(2016, 3, 15),
                        TaskName = "Test Task 2"
                    }
                }).MustBeCalled();

            //Act
            TdController controller = new TdController(todoRepository);
            ViewResult viewResult = controller.Index();
            var model = viewResult.Model as IEnumerable<Todo>;

            //Assert
            Assert.AreEqual(2,model.Count());
        }
        public void Details_Returns_A_Todo()
        {
            //Arrange
            int id = 1;
            var todoRepository = Mock.Create<Repository>();
            Mock.Arrange(() => todoRepository.Find(id)).
                Returns(
                    new Todo()
                    {
                        TodoId = 1,
                        Deadline = new DateTime(2016, 2, 23),
                        TaskName = "Test Task 1"
                    }
                ).MustBeCalled();

            //Act
            TdController controller = new TdController(todoRepository);
            ViewResult viewResult = controller.Details(id) as ViewResult;
            var model = viewResult.Model as Todo;

            //Assert
            Assert.AreEqual(1,model.TodoId);
        }