public void Create_WithMapping_ConstructsWordListRetriever() { CustomWordListFactory.Configure((s) => s); var result = CustomWordListFactory.Create(); Assert.IsInstanceOf <CustomWordListRetriever>(result); }
public override bool Validate(string password) { var regex = GetRegexForPassword(password); var customWords = CustomWordListFactory.Create(); foreach (string fileName in Settings.CustomWordLists) { string wordList = customWords.Retrieve(fileName); if (regex.IsMatch(wordList)) { return(false); } } return(true); }