public void SignUp_RedirectsGetToHome()
        {
            var controller = new SignUpController(configuration, signUpQueueingService, charityMembershipService);
            var result = controller.SignUp();

            result.AssertActionRedirect();
        }
        public void SignUp_WithSuccessfulStore_RedirectsToComplete()
        {
            var requiredInfoViewModel = new RequiredInfoViewModel
                                            {
                                                UserIdentifier = "A",
                                                Password = "******",
                                                CharityName = "C",
                                            };

            var controller = new SignUpController(configuration, signUpQueueingService, charityMembershipService);
            charityMembershipService.RegisterUserAndCharity(null).ReturnsForAnyArgs(true);
            var result = controller.SignUp(requiredInfoViewModel);
            result.AssertActionRedirect().ToAction("Complete");
        }
        public void SignUp_WithUnsuccessfulStore_RendersView()
        {
            var requiredInfoViewModel = new RequiredInfoViewModel
                                            {
                                                UserIdentifier = "A",
                                                Password = "******",
                                                CharityName = "C",
                                            };

            var controller = new SignUpController(configuration, signUpQueueingService, charityMembershipService);
            charityMembershipService.RegisterUserAndCharity(null).ReturnsForAnyArgs(false);
            var result = controller.SignUp(requiredInfoViewModel);
            
            result.AssertViewRendered();
        }
 public void StartSite_RendersView()
 {
     var controller = new SignUpController(configuration, signUpQueueingService, charityMembershipService);
     var result = controller.StartSite("");
     result.AssertViewRendered().WithViewData<StartSiteViewModel>();
 }
 public void StoreAdditionalInfo_RendersView()
 {
     var controller = new SignUpController(configuration, signUpQueueingService, charityMembershipService);
     var result = controller.StoreAdditionalInfo(new CompleteViewModel());
     result.AssertViewRendered().WithViewData<CompleteViewModel>();
 }