示例#1
0
        public void IfOnlyFirstDigitIsANumberNotEqualToZero_ReturnExpectedOutput()
        {
            long   number   = 9000000;
            string expected = "9000000";
            string actual   = Expander.ExpandNumber(number);

            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void IfLengthIsMoreThanThreeAndHasZeros_ReturnHundredsTensAndOnes()
        {
            long   number   = 54203;
            string expected = "50000 + 4000 + 200 + 3";
            string actual   = Expander.ExpandNumber(number);

            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void IfLengthIsThreeAndThereAreNoZeros_ReturnHundredsTensAndOnes()
        {
            long   number   = 375;
            string expected = "300 + 70 + 5";
            string actual   = Expander.ExpandNumber(number);

            Assert.AreEqual(expected, actual);
        }
示例#4
0
        public void IfLengthIsTwoAndOnePlaceIsZero_ReturnTensOnly()
        {
            long   number   = 20;
            string expected = "20";
            string actual   = Expander.ExpandNumber(number);

            Assert.AreEqual(expected, actual);
        }
示例#5
0
        public void IfLengthIsTwo_ReturnTensPlusOnes()
        {
            long   number   = 21;
            string expected = "20 + 1";
            string actual   = Expander.ExpandNumber(number);

            Assert.AreEqual(expected, actual);
        }
示例#6
0
        public void IfLengthIsOne_ReturnNumber()
        {
            long   number   = 1;
            string expected = "1";
            string actual   = Expander.ExpandNumber(number);

            Assert.AreEqual(expected, actual);
        }