Beispiel #1
0
        static void Main(string[] args)
        {
            var wordSearcher = new WordSearcher(
                new WordLoader(@"http://dl.dropboxusercontent.com/u/7543760/wordlist.txt"),
                new RegexBuilder());

            var length = int.Parse(args[0]);
            var matchingWords = wordSearcher.FindMatches(length, args[1]);

            matchingWords.ForEach(Console.WriteLine);
        }
Beispiel #2
0
        public void GetMatchingWords_FiltersByLength(int length, int expectedMatches)
        {
            var matches = _wordSearcher.FindMatches(length, "a");

            Assert.That(matches, Has.Count.EqualTo(expectedMatches));
        }