Beispiel #1
0
        public void User_Password_Reset_Update()
        {
            var userPasswordResetRequest =
                UserPasswordResetRequestRepository.UserPasswordResetRequestAdd("*****@*****.**");
            var userPasswordReset =
                UserPasswordResetRepository.UserPasswordResetFetch(userPasswordResetRequest.Token);

            var password = DataHelper.RandomString(20);

            userPasswordReset.Password             = password;
            userPasswordReset.PasswordConfirmation = password;

            userPasswordReset = UserPasswordResetRepository.UserPasswordResetSave(userPasswordReset);
        }
Beispiel #2
0
        public void User_Password_Reset_Fetch()
        {
            var userPasswordResetRequest =
                UserPasswordResetRequestRepository.UserPasswordResetRequestAdd("*****@*****.**");
            var userPasswordReset =
                UserPasswordResetRepository.UserPasswordResetFetch(userPasswordResetRequest.Token);

            Assert.IsFalse(userPasswordReset.IsNew, "IsNew should be false");
            Assert.IsFalse(userPasswordReset.IsDirty, "IsDirty should be false");
            Assert.IsFalse(userPasswordReset.IsValid, "IsValid should be false");
            Assert.IsFalse(userPasswordReset.IsSelfDirty, "IsSelfDirty should be false");
            Assert.IsFalse(userPasswordReset.IsSelfValid, "IsSelfValid should be false");

            Assert.IsTrue(
                ValidationHelper.ContainsRule(userPasswordReset, DbType.String, "Password"),
                "Password should be required");

            Assert.IsTrue(
                ValidationHelper.ContainsRule(userPasswordReset, DbType.String, "PasswordConfirmation"),
                "PasswordConfirmation should be required");
        }
        public void User_Password_Reset_Request_Add()
        {
            var userPasswordResetRequest = UserPasswordResetRequestRepository.UserPasswordResetRequestAdd("*****@*****.**");

            Assert.IsTrue(userPasswordResetRequest.Success, "Return result should be true");
        }