public async Task TestMixedAsync() { var errorCode = StanfordPasswordValidatorBase.ErrorCode.NoMixedCase; var password = "******"; IdentityResultAssert.IsFailure(await validator.ValidateAsync(manager, user, password), errorCode); password = new string('a', 16); IdentityResultAssert.IsFailure(await validator.ValidateAsync(manager, user, password), errorCode); password = "******"; IdentityResultAssert.IsFailure(await validator.ValidateAsync(manager, user, password), errorCode); password = new string('a', 20); IdentityResultAssert.IsSuccess(await validator.ValidateAsync(manager, user, password)); }
public async Task TestCorrectAsync(string password) { IdentityResultAssert.IsSuccess(await validator.ValidateAsync(manager, user, password)); }