public void Index()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.About() as ViewResult;

            // Assert
            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
        }
        public void Details()
        {
            // Arrange
            HomeController controller = new HomeController(tlsMock.Object);

            // Act
            ViewResult result = controller.Details(5) as ViewResult;

            // Assert
            tlsMock.Verify(t => t.FindLog(5), Times.Once);
        }
        public void CreateGet()
        {
            // Arrange
            HomeController controller = new HomeController(tlsMock.Object);

            // Act
            ViewResult result = controller.Create() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
        public void Index()
        {
            // Arrange
            HomeController controller = new HomeController(tlsMock.Object);

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            tlsMock.Verify(t => t.GetEntriesByDate(It.IsAny<DateTime?>()), Times.Once);
        }
        public void CreatePost()
        {
            // Arrange
            HomeController controller = new HomeController(tlsMock.Object);
            var log = new Log()
            {
                UserId = "doug",
                Billable = false,
                StartTime = DateTime.Now.AddHours(-1),
                EndTime = DateTime.Now,
                Comment = "test entry",
            };

            // Act
            ViewResult result = controller.Create(log) as ViewResult;

            // Assert
            tlsMock.Verify(t => t.AddLog(It.Is<Log>(l => l.Equals(log))), Times.Once);
        }