public void PossiblyVerySlowCode_WithTimeLessThan25000Milliseconds()
 {
     for (int source = 0; source < 10_000_000; source++)
     {
         NumbersExtension.IsPalindrome(source);
     }
 }
        public void IsPalindrome_PositiveNumber_False()
        {
            bool expected = false;

            bool result = NumbersExtension.IsPalindrome(12345321);

            Assert.AreEqual(expected, result);
        }
 public void IsPalindrome_Throw_ArgumentOutOfRangeException()
 {
     Assert.ThrowsException <ArgumentOutOfRangeException>(() => NumbersExtension.IsPalindrome(-111),
                                                          message: " number cannot be negative");
 }
Esempio n. 4
0
 public void IsPalindrom_ArgumentOutOfRangeException_Less() =>
 Assert.Throws <ArgumentOutOfRangeException>(() => NumbersExtension.IsPalindrome(-121),
                                             message: "number cannot be negative");
Esempio n. 5
0
 public bool IsPalindrome_SomeNumbers_False(int number)
 {
     return(NumbersExtension.IsPalindrome(number));
 }
Esempio n. 6
0
 public bool IsPalindrome_PositiveNumbers_True(int number)
 {
     return(NumbersExtension.IsPalindrome(number));
 }