public void ThenItRedirectsForValidEasyAccessKeyIds(string easyAccessKey)
        {
            var model = new GetFeedbackFormViewModel() { EasyAccessKey = easyAccessKey };

            var controller = new HomeController();
            var actionResult = (RedirectToActionResult)controller.CheckEasyAccessKey(model);

            Assert.That(actionResult, Is.Not.Null);
            Assert.That(actionResult.ActionName, Is.EqualTo("Index"));
            Assert.That(actionResult.ControllerName, Is.EqualTo("feedback"));
            Assert.That(actionResult.RouteValues["easyAccessKey"], Is.EqualTo(easyAccessKey));
        }
        public void OtherwiseItHandlesInvalidValues(string easyAccessKey, string expectedMessage)
        {
            var model = new GetFeedbackFormViewModel() { EasyAccessKey = easyAccessKey };
            var controller = new HomeController();

            var validationErrors = CheckForValidationErrors(controller, model);

            var actionResult = (ViewResult)controller.CheckEasyAccessKey(model);
            var modelState = controller.ModelState;

            Assert.That(validationErrors.Count, Is.EqualTo(1));
            Assert.That(validationErrors[0].ErrorMessage, Is.EqualTo(expectedMessage));

            Assert.That(actionResult.ViewName, Is.EqualTo("Index"));
        }