예제 #1
0
        public void TestTrue4()
        {
            //Arrange
            string         s = "never odd, or even.";
            TestPalindrome p = new TestPalindrome();
            //Act
            bool pal = p.TestPal(s);

            //Assert
            Assert.IsTrue(pal);
        }
예제 #2
0
        public void TestFalse1()
        {
            //Arrange
            string         s = "one two one";
            TestPalindrome p = new TestPalindrome();
            //Act
            bool pal = p.TestPal(s);

            //Assert
            Assert.IsFalse(pal);
        }
예제 #3
0
        public void TestTrue3()
        {
            //Arrange
            string         s = "1221";
            TestPalindrome p = new TestPalindrome();
            //Act
            bool pal = p.TestPal(s);

            //Assert
            Assert.IsTrue(pal);
        }
예제 #4
0
        public void TestFalse2()
        {
            //Arrange
            string         s = "123abccba123";
            TestPalindrome p = new TestPalindrome();
            //Act
            bool pal = p.TestPal(s);

            //Assert
            Assert.IsFalse(pal);
        }
예제 #5
0
        public static void Main()
        {
            Console.WriteLine("please Enter a word");
            string input = Console.ReadLine();

            TestPalindrome test = new TestPalindrome(input);

            test.RemoveCapitals();
            test.ReverseString();
            Console.WriteLine((test.PalindromeCheck()).ToString());
        }
예제 #6
0
        public void TestPrepare()
        {
            //Arrange
            string         s = "Welcome, to the game.";
            string         e = "welcometothegame";
            TestPalindrome p = new TestPalindrome();

            //Act
            s = p.Prepare(s);
            //Assert
            Assert.AreEqual(e, s);
        }
예제 #7
0
        public void TestReverse()
        {
            //Arrange
            string         s = "hello world";
            string         r = "dlrow olleh";
            TestPalindrome p = new TestPalindrome();

            //Act
            s = p.Reverse(s);
            //Assert
            Assert.AreEqual(r, s);
        }