コード例 #1
0
        public ActionResult ConfirmRegistration(string guid)
        {
            var registrationConfirmationModel = new RegistrationConfirmationModel();

            registrationConfirmationModel.Confirm(guid);

            return(View("RegistrationConfirmationSuccessful"));
        }
コード例 #2
0
        public void Authenthicate_ValidAndConfirmedUser_ReturnsTrue()
        {
            RegistrationConfirmationModel registrationConfirmationModel = new RegistrationConfirmationModel();

            registrationConfirmationModel.Confirm(userRegistrationModel.Id.ToString());

            UserModel userModel = new UserModel()
            {
                Email    = userRegistrationModel.Email,
                Password = userRegistrationModel.Password
            };

            var actual = userModel.Authenthicate();

            Assert.IsTrue(actual);
        }
コード例 #3
0
        public void Authenthicate_ExistentConfirmedEmailWrongPassword_ReturnsFalse()
        {
            RegistrationConfirmationModel registrationConfirmationModel = new RegistrationConfirmationModel();

            registrationConfirmationModel.Confirm(userRegistrationModel.Id.ToString());

            UserModel userModel = new UserModel()
            {
                Email    = userRegistrationModel.Email,
                Password = "******"
            };

            var actual = userModel.Authenthicate();

            Assert.IsFalse(actual);
        }
コード例 #4
0
 public void TestInitialize()
 {
     registrationConfirmationModel = new RegistrationConfirmationModel();
 }