Пример #1
0
        public void ProcessList_ReturnsListOfListsOfWordsAsExpected()
        {
            var wordlist = new List <string>
            {
                "act",
                "cat",
                "rate",
                "tare",
                "tear",
                "zephyr"
            };

            var expectedResult = new List <List <string> >
            {
                new List <string> {
                    "act", "cat"
                },
                new List <string> {
                    "rate", "tare", "tear"
                },
                new List <string> {
                    "zephyr"
                }
            };

            var result = Anagrammer.ProcessList(wordlist);

            Assert.AreEqual(expectedResult, result);
        }
Пример #2
0
        public void GivenAnEmptyWordList_ProcessList_ReturnsAnEmptyListOfListsOfWords()
        {
            var wordlist       = new List <string>();
            var expectedResult = new List <List <string> >();

            var result = Anagrammer.ProcessList(wordlist);

            Assert.AreEqual(expectedResult, result);
        }