Example #1
0
        public void GetLongestPalindromeTest()
        {
            var str    = "12321";
            var length = PalindromeCollector.GetLongestPalindrome(str);

            Assert.IsTrue(length == 5);
            Console.WriteLine("Max palindrome length of {0} is {1}", str, length);
        }
Example #2
0
        public void GetTheLongestPalindromeTest()
        {
            var str  = "asd12321gfs7887";
            var pldm = PalindromeCollector.GetTheLongestPalindrome(str);

            Assert.IsTrue(pldm == "12321");
            Console.WriteLine("The longest palindrome of {0} is {1}", str, pldm);
        }
Example #3
0
        public void CollectPalindromesTest()
        {
            var str   = "asd12321gfs7887";
            var pldms = PalindromeCollector.CollectPalindromes(str);

            Assert.IsNotNull(pldms);

            foreach (var pldm in pldms)
            {
                Console.WriteLine("pldm {0}", pldm);
            }
        }