예제 #1
0
        public void Input21_ReturnTensAndOnesText_OneHUndredTwenty()
        {
            int           userInput      = 120;
            NumToWord     newNumToWord   = new NumToWord(userInput);
            List <string> userOutput     = newNumToWord.Convert();
            List <string> expectedOutput = new List <string> {
                "one hundred", "twenty"
            };

            Assert.Equal(expectedOutput, userOutput);
        }
예제 #2
0
        public void InputOne_ReturnOne_One()
        {
            int           userInput      = 1;
            NumToWord     newNumToWord   = new NumToWord(userInput);
            List <string> userOutput     = newNumToWord.Convert();
            List <string> expectedOutput = new List <string> {
                "one"
            };

            Assert.Equal(expectedOutput, userOutput);
        }
예제 #3
0
        public void Input21_ReturnTensAndOnesText_Hundreds()
        {
            int           userInput      = 400;
            NumToWord     newNumToWord   = new NumToWord(userInput);
            List <string> userOutput     = newNumToWord.Convert();
            List <string> expectedOutput = new List <string> {
                "four hundred"
            };

            Assert.Equal(expectedOutput, userOutput);
        }
예제 #4
0
        public void Input21_ReturnTensAndOnesText_TensAndOnes()
        {
            int           userInput      = 99;
            NumToWord     newNumToWord   = new NumToWord(userInput);
            List <string> userOutput     = newNumToWord.Convert();
            List <string> expectedOutput = new List <string> {
                "ninety", "nine"
            };

            Assert.Equal(expectedOutput, userOutput);
        }
예제 #5
0
        public void InputTens_ReturnTensText_Tens()
        {
            int           userInput      = 10;
            NumToWord     newNumToWord   = new NumToWord(userInput);
            List <string> userOutput     = newNumToWord.Convert();
            List <string> expectedOutput = new List <string> {
                "ten"
            };

            Assert.Equal(expectedOutput, userOutput);
        }
예제 #6
0
        public void InputSix_ReturnSixText_Six()
        {
            int           userInput      = 6;
            NumToWord     newNumToWord   = new NumToWord(userInput);
            List <string> userOutput     = newNumToWord.Convert();
            List <string> expectedOutput = new List <string> {
                "six"
            };

            Assert.Equal(expectedOutput, userOutput);
        }
예제 #7
0
        public void Input21_ReturnTensAndOnesText_OneHundredPlusTeens()
        {
            int           userInput      = 115;
            NumToWord     newNumToWord   = new NumToWord(userInput);
            List <string> userOutput     = newNumToWord.Convert();
            List <string> expectedOutput = new List <string> {
                "one hundred", "fifteen"
            };

            Assert.Equal(expectedOutput, userOutput);
        }