public void RegistrationController_CreateAccountReturnsUser_ShouldRenderSuccessView()
        {
            var sut = new RegistrationController(_mrUserAccountServiceMock.Object);

            var regModel = new RegistrationModel();
            regModel.Email = "*****@*****.**";
            sut.WithCallTo(x => x.Index(regModel)).ShouldRenderView("Success");
        }
        public void RegistrationController_CreateAccountThrowsValidationException_ShouldRenderDefaultView()
        {
            var sut = new RegistrationController(_mrUserAccountServiceMock.Object);

            var regModel = new RegistrationModel();
            regModel.Email = "*****@*****.**";

            sut.WithCallTo(x => x.Index(regModel)).ShouldRenderDefaultView();
        }
        public void RegistrationController_CreateAccountReturnsNull_ShouldThrowError()
        {
            var sut = new RegistrationController(_mrUserAccountServiceMock.Object);

            var regModel = new RegistrationModel();

            ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => sut.Index(regModel));

            Assert.AreEqual(ex.ParamName, "account");
        }
        public void RegistrationController_CalledWithSignIString_ShouldRenderDefaultView()
        {
            var sut = new RegistrationController(_mrUserAccountServiceMock.Object);

            sut.WithCallTo(x => x.Index("9e2551b17d891245108b300484e4e9d3")).ShouldRenderDefaultView();
        }