예제 #1
0
        public void Only_NonAlphaNumeric_Symbols_In_String_Should_Return_True()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome("... . .");

            //Assert
            Assert.True(result);
        }
예제 #2
0
        public void Palindrome_Should_Return_True()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome("A man, a plan, a canal: Panama");

            //Assert
            Assert.True(result);
        }
예제 #3
0
        public void One_Empty_Symbol_Should_Return_True()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome(" ");

            //Assert
            Assert.True(result);
        }
예제 #4
0
        public void Two_Different_Symbols_Where_One_Of_Them_Non_Letter_Should_Return_True()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome("a.");

            //Assert
            Assert.True(result);
        }
예제 #5
0
        public void Two_Different_NonAlphanumeric_Symbols_Should_Return_True()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome("..");

            //Assert
            Assert.True(result);
        }
예제 #6
0
        public void Two_Different_Symbols_Should_Return_False()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome("ab");

            //Assert
            Assert.False(result);
        }
예제 #7
0
        public void Empty_String_Should_Return_False()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome(string.Empty);

            //Assert
            Assert.True(result);
        }
예제 #8
0
        public void String_Should_Return_False()
        {
            // Arrange
            var solution = new ValidPalindromeSolution();

            //act
            var result = solution.IsPalindrome("race a car");

            //Assert
            Assert.False(result);
        }