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

            IdentityResultAssert.IsSuccess(await valid.ValidateAsync(manager, null, input));
        }
Ejemplo n.º 2
0
        public async Task FailsIfCommon100000(string input)
        {
            var passwordLists = new PasswordLists(
                MockHelpers.MockOptions().Object,
                MockHelpers.MockILogger <PasswordLists>().Object);
            var manager = MockHelpers.TestUserManager <TestUser>();
            var valid   = new Top100000PasswordValidator <TestUser>(passwordLists, new OptionsStub());

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