Exemplo n.º 1
0
        private Anagram2 CreateAnagram2()
        {
            ICombinator <char> combinator  = new GenericCombinator <char>();
            List <string>      wordChoices = LoadWordChoices();

            return(new Anagram2(combinator, wordChoices));
        }
Exemplo n.º 2
0
        public void ListOfLetters_FindCombinations_AllFound()
        {
            char[] source        = { 'A', 'B', 'C' };
            long   expectedCount = GetFactorial(source.Length);

            var sut = new GenericCombinator <char>();

            var result = sut.FindCombinations("ABC".ToCharArray());

            ((long)result.Count).ShouldBe(expectedCount, "Incorrect combination count returned");
            ((long)result.Distinct().Count()).ShouldBe(expectedCount, "Combos have non-unique members");
        }