public async Task SuccessIfLessCommonThan500(string input) { var passwordLists = new PasswordLists( MockHelpers.MockOptions().Object, MockHelpers.MockILogger <PasswordLists>().Object); var manager = MockHelpers.TestUserManager <TestUser>(); var valid = new Top500PasswordValidator <TestUser>(passwordLists); IdentityResultAssert.IsSuccess(await valid.ValidateAsync(manager, null, input)); }
public async Task FailsIfCommon500(string input) { var passwordLists = new PasswordLists( MockHelpers.MockOptions().Object, MockHelpers.MockILogger <PasswordLists>().Object); var manager = MockHelpers.TestUserManager <TestUser>(); var valid = new Top500PasswordValidator <TestUser>(passwordLists, new OptionsStub()); IdentityResultAssert.IsFailure(await valid.ValidateAsync(manager, null, input), _error); }