Esempio n. 1
0
        public void CanReverseMaxInt()
        {
            var number = int.MaxValue; //2147483647

            var expected = 7463847412;
            var actual   = ReverseDigitsSolution.Reverse(number);

            Assert.Equal(expected, actual);
        }
Esempio n. 2
0
        public void CanReversePositiveNumber()
        {
            var number = 42;

            var expected = 24;
            var actual   = ReverseDigitsSolution.Reverse(number);

            Assert.Equal(expected, actual);
        }
Esempio n. 3
0
        public void CanReverseNegativeNumber()
        {
            var number = -314;

            var expected = -413;
            var actual   = ReverseDigitsSolution.Reverse(number);

            Assert.Equal(expected, actual);
        }