Beispiel #1
0
        public void ShouldReverseList()
        {
            var  a       = PalindromSolverReverse.FromString("ABC");
            Node reverse = a.Reverse();

            Assert.Equal("CBA", reverse.ToString());
        }
Beispiel #2
0
        public void ShouldCheckMatchesEmpty()
        {
            PalindromSolverReverse a = PalindromSolverReverse.FromString("");
            PalindromSolverReverse b = PalindromSolverReverse.FromString("");

            Assert.True(a.Matches(b));
        }
Beispiel #3
0
        public void ShouldCheckNotMatchesSameSize()
        {
            PalindromSolverReverse a = PalindromSolverReverse.FromString("ABC");
            PalindromSolverReverse b = PalindromSolverReverse.FromString("ABZ");

            Assert.False(a.Matches(b));
        }
Beispiel #4
0
        public void ShouldCheckTwoCharsNotPalindromString()
        {
            var a = PalindromSolverReverse.FromString("AB");

            Assert.False(a.IsPalindrom());
        }
Beispiel #5
0
        public void ShouldCheckTwoCharsPalindromString()
        {
            var a = PalindromSolverReverse.FromString("AA");

            Assert.True(a.IsPalindrom());
        }
Beispiel #6
0
        public void ShouldParsePalindrom()
        {
            PalindromSolverReverse palindrom = PalindromSolverReverse.FromString("ABA");

            Assert.Equal("ABA", palindrom.ToString());
        }
Beispiel #7
0
        public void ShouldCheckEmptyString()
        {
            var a = PalindromSolverReverse.FromString("");

            Assert.True(a.IsPalindrom());
        }
Beispiel #8
0
        public void ShouldCheckSmallPalindrom()
        {
            var a = PalindromSolverReverse.FromString("ABA");

            Assert.True(a.IsPalindrom());
        }