예제 #1
0
        public void Test_Palindroms_Longer_Word_One_Character()
        {
            //Given
            IEnumerable <string> enumerable = new[] { "a", "a", "a", "aa", "aa", "aa", "aaa" };
            // When
            var palindroms = StringOperations.GeneratePalindroms("aaa");

            //Then
            Assert.Empty(palindroms.Except(enumerable));
        }
예제 #2
0
        public void Test_Palindroms_For_Simple_Word()
        {
            //Given
            IEnumerable <string> enumerable = new[] { "a", "b", "c" };
            //When
            var palindroms = StringOperations.GeneratePalindroms("abc");

            //Then
            Assert.Empty(palindroms.Except(enumerable));
        }
예제 #3
0
        public void Test_Palindroms_Longer_Word()
        {
            //Given
            IEnumerable <string> enumerable = new[] { "a", "b", "c", "aa",
                                                      "aaa", "aaaa", "aba", "aabaa" };
            // When
            var palindroms = StringOperations.GeneratePalindroms("aabaac").Distinct();

            //Then
            Assert.Empty(palindroms.Except(enumerable));
        }