Beispiel #1
0
        public void GivenAnEmptyList_PairAlphabetizedWords_ReturnsAnEmptyList()
        {
            var wordlist = new List <string>();

            var expectedResult = new List <Tuple <string, string> >();

            var result = Anagrammer.PairAlphabeticalCharsWithWords(wordlist);

            Assert.AreEqual(expectedResult, result);
        }
Beispiel #2
0
        public void PairAlphabetizedWords()
        {
            var wordlist = new List <string>
            {
                "act", "cat", "dog"
            };

            var expectedResult = new List <Tuple <string, string> >
            {
                new Tuple <string, string>("act", "act"),
                new Tuple <string, string>("act", "cat"),
                new Tuple <string, string>("dgo", "dog")
            };

            var result = Anagrammer.PairAlphabeticalCharsWithWords(wordlist);

            Assert.AreEqual(expectedResult, result);
        }