public void IsValidFalseAlreadyUsedTest()
        {
            _forgottenPassword.Use(5);
            var result = _forgottenPassword.IsValid(5);

            Assert.AreEqual(false, result);
        }
예제 #2
0
        public void AddPasswordRequestDomainValidationExceptionUsedTest()
        {
            _forgottenPassword.Use(5);

            Assert.Throws <DomainValidationException>(() =>
            {
                _user.AddPasswordResetRequest(_forgottenPassword, 5);
            });
        }
        public void UseDomainValidationExceptionExpiredTest()
        {
            _forgottenPassword = new ForgottenPassword(new Guid(ForgottenPasswordGuid));
            Thread.Sleep(2000);

            Assert.Throws <DomainValidationException>(() =>
            {
                _forgottenPassword.Use(0);
            });
        }