IsExpired() public méthode

public IsExpired ( ) : bool
Résultat bool
Exemple #1
0
        public void PasswordShouldExpireAfterTheExpiryDuration()
        {
            var password = new Password {PasswordString = "twewerer34#"};
            password.CreatedOn = DateTime.Today.AddDays(-91);
            Assert.True(password.IsExpired());

            password.CreatedOn = DateTime.Today.AddDays(-90);
            Assert.False(password.IsExpired());

            password.CreatedOn = DateTime.Today.AddDays(-56);
            Assert.False(password.IsExpired());
        }