SendNotificationOnPasswordExpiry() public méthode

public SendNotificationOnPasswordExpiry ( ) : void
Résultat void
Exemple #1
0
        public void ReminderMailShouldBeSentOneWeekBeforeExpiration()
        {
            var password = new Password {PasswordString = "twewerer34#"};
            password.CreatedOn = DateTime.Today.AddDays(-84);
            password.ExpiryNotificationSent = false;
            password.SendNotificationOnPasswordExpiry();
            Assert.True(password.ExpiryNotificationSent);

            password.CreatedOn = DateTime.Today.AddDays(-83);
            password.ExpiryNotificationSent = false;
            password.SendNotificationOnPasswordExpiry();
            Assert.False(password.ExpiryNotificationSent);

            password.CreatedOn = DateTime.Today.AddDays(-56);
            password.ExpiryNotificationSent = false;
            password.SendNotificationOnPasswordExpiry();
            Assert.False(password.ExpiryNotificationSent);
        }