Exemplo n.º 1
0
        public void IsPalindromeTest_NegativeNumber()
        {
            var solution = new _009_PalindromeNumber();
            var result   = solution.IsPalindrome(-1);

            Assert.IsFalse(result);
        }
Exemplo n.º 2
0
        public void IsPalindromeTest_SingleDigit()
        {
            var solution = new _009_PalindromeNumber();
            var result = solution.IsPalindrome(0);
            Assert.IsTrue(result);

            result = solution.IsPalindrome(1);
            Assert.IsTrue(result);
        }
Exemplo n.º 3
0
        public void IsPalindromeTest_SingleDigit()
        {
            var solution = new _009_PalindromeNumber();
            var result   = solution.IsPalindrome(0);

            Assert.IsTrue(result);

            result = solution.IsPalindrome(1);
            Assert.IsTrue(result);
        }
Exemplo n.º 4
0
        public void IsPalindromeTest_MultipleDigit()
        {
            var solution = new _009_PalindromeNumber();
            var result = solution.IsPalindrome(11);
            Assert.IsTrue(result);

            result = solution.IsPalindrome(121);
            Assert.IsTrue(result);

            result = solution.IsPalindrome(1231);
            Assert.IsFalse(result);
        }
Exemplo n.º 5
0
        public void IsPalindromeTest_MultipleDigit()
        {
            var solution = new _009_PalindromeNumber();
            var result   = solution.IsPalindrome(11);

            Assert.IsTrue(result);

            result = solution.IsPalindrome(121);
            Assert.IsTrue(result);

            result = solution.IsPalindrome(1231);
            Assert.IsFalse(result);
        }
Exemplo n.º 6
0
 public void IsPalindromeTest_NegativeNumber()
 {
     var solution = new _009_PalindromeNumber();
     var result = solution.IsPalindrome(-1);
     Assert.IsFalse(result);
 }