public void ShouldDisplayIndexView()
        {
            // Arrange
            CGiController controller = new CGiController();

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

            // Assert
            Assert.AreEqual("", result.ViewName);
        }
        public void ShouldRedirectToActionIfNoHandler()
        {
            // Arrange
            CGiController controller = new CGiController();

            // Act
            RedirectToRouteResult result = controller.Index(null) as RedirectToRouteResult;

            // Assert
            Assert.AreNotEqual(null, result);
            Assert.AreEqual("Index", result.RouteValues["action"]);
        }
        public void ShouldPerformAction()
        {
            // Arrange
            CGiController controller = new CGiController();
            FakeHandler handler = new FakeHandler();

            // Act
            ActionResult result = controller.Index(handler);

            // Assert
            Assert.IsTrue(result is JsonResult);
        }