public void ConfirmGoodPasswordWhenHavingSpecialCharacter() { var password = "******"; Assert.IsFalse(RandomPasswordProvider.IsGoodPassword(password, new PasswordRequestOptions() { CaseType = new CaseTypeLettersAndNumbers(), SpecialCharacter = true })); }
public void ConfirmBadPasswordWhenMissingNumbers() { var password = "******"; Assert.IsFalse(RandomPasswordProvider.IsGoodPassword(password, new PasswordRequestOptions() { CaseType = new CaseTypeLettersAndNumbers(), SpecialCharacter = false })); }
public void AddLowerCaseToAnAllUpperCasePasswordAndReplaceTheCorrectLetter() { var originalPassword = "******"; var provider = new RandomPasswordProvider(randomStringSource); var newPassword = provider.GenerateMixedCase(originalPassword); Assert.AreEqual(originalPassword, newPassword.ToUpper()); }
public void ConfirmGoodPasswordHasLettersAndNumbers() { var password = "******"; Assert.IsTrue(RandomPasswordProvider.IsGoodPassword(password, new PasswordRequestOptions() { CaseType = new CaseTypeLettersAndNumbers(), SpecialCharacter = false })); }
public void AddLowerCaseToAnAllUpperCasePassword() { var originalPassword = "******"; var provider = new RandomPasswordProvider(randomStringSource); var newPassword = provider.GenerateMixedCase(originalPassword); Assert.IsTrue(newPassword.Any(char.IsUpper) && newPassword.Any(char.IsLower)); }