Пример #1
0
        public void Given10Return11WithSteps()
        {
            int step;

            Assert.AreEqual(11, PalindromeMaker.From(10, out step));
            Assert.AreEqual(1, step);
        }
Пример #2
0
        public void Given5WithStepsReturns0Steps()
        {
            int step;

            PalindromeMaker.From(5, out step);
            Assert.AreEqual(0, step);
        }
Пример #3
0
        public void GivenValReturnsPalindromeInSteps()
        {
            int step;

            Assert.AreEqual(444, PalindromeMaker.From(123, out step));
            Assert.AreEqual(1, step);
            Assert.AreEqual(8813200023188, PalindromeMaker.From(286, out step));
            Assert.AreEqual(23, step);
            Assert.AreEqual(BigInteger.Parse("4478555400006996000045558744"), PalindromeMaker.From(196196871, out step));
            Assert.AreEqual(45, step);
        }
Пример #4
0
        public void Given196ThrowsException()
        {
            int step;

            PalindromeMaker.From(196, out step);
        }
Пример #5
0
        public void Given24Return66()
        {
            int step;

            Assert.AreEqual(66, PalindromeMaker.From(24, out step));
        }
Пример #6
0
        public void Given5Returns5WithSteps()
        {
            int step;

            Assert.AreEqual(5, PalindromeMaker.From(5, out step));
        }