public async Task FailsIfCommon1000(string input)
        {
            var passwordLists = new PasswordLists(
                MockHelpers.MockOptions().Object,
                MockHelpers.MockILogger <PasswordLists>().Object);
            var manager = MockHelpers.TestUserManager <TestUser>();
            var valid   = new Top1000PasswordValidator <TestUser>(passwordLists);

            IdentityResultAssert.IsFailure(await valid.ValidateAsync(manager, null, input), _error);
        }
Example #2
0
        public async Task SuccessIfLessCommonThan1000(string input)
        {
            var passwordLists = new PasswordLists(
                MockHelpers.MockOptions().Object,
                MockHelpers.MockILogger <PasswordLists>().Object);
            var manager = MockHelpers.TestUserManager <TestUser>();
            var valid   = new Top1000PasswordValidator <TestUser>(passwordLists, new OptionsStub());

            IdentityResultAssert.IsSuccess(await valid.ValidateAsync(manager, null, input));
        }