예제 #1
0
        public void IsPalindrome_UserInputLOL_ReturnTrue()
        {
            LinkedList <char> userInput = new LinkedList <char>();

            userInput.AddLast('L');
            userInput.AddLast('O');
            userInput.AddLast('L');

            Assert.AreEqual(true, Assignment_Week_5.isPalindrome(userInput));
        }
예제 #2
0
        public void IsPalindrome_UserInput10101017_ReturnFalse()
        {
            LinkedList <char> userInput = new LinkedList <char>();

            userInput.AddLast('1');
            userInput.AddLast('0');
            userInput.AddLast('1');
            userInput.AddLast('0');
            userInput.AddLast('1');
            userInput.AddLast('0');
            userInput.AddLast('1');
            userInput.AddLast('7');

            Assert.AreEqual(false, Assignment_Week_5.isPalindrome(userInput));
        }
예제 #3
0
        public void IsPalindrome_UserInputSeheTeHeS_ReturnTrue()
        {
            LinkedList <char> userInput = new LinkedList <char>();

            userInput.AddLast('S');
            userInput.AddLast('e');
            userInput.AddLast('h');
            userInput.AddLast('e');
            userInput.AddLast('t');
            userInput.AddLast('e');
            userInput.AddLast('h');
            userInput.AddLast('e');
            userInput.AddLast('S');

            Assert.AreEqual(true, Assignment_Week_5.isPalindrome(userInput));
        }
예제 #4
0
        public void IsPalindrome_UserInputNursesRun_ReturnFalse()
        {
            LinkedList <char> userInput = new LinkedList <char>();

            userInput.AddLast('N');
            userInput.AddLast('u');
            userInput.AddLast('r');
            userInput.AddLast('s');
            userInput.AddLast('e');
            userInput.AddLast('s');
            userInput.AddLast(' ');
            userInput.AddLast('R');
            userInput.AddLast('u');
            userInput.AddLast('n');

            Assert.AreEqual(false, Assignment_Week_5.isPalindrome(userInput));
        }
예제 #5
0
        public void IsPalindrome_UserInputEmpty_ThrowsException()
        {
            LinkedList <char> userInput = new LinkedList <char>();

            Assignment_Week_5.isPalindrome(userInput);
        }
예제 #6
0
        public void IsPalindrome_UserInputNull_ThrowsException()
        {
            LinkedList <char> userInput = null;

            Assignment_Week_5.isPalindrome(userInput);
        }