Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello Question 7!");

            QuestionSeven questionSeven = new QuestionSeven();

            Console.Write("Enter a whole Number:  ");
            string inputS7 = Console.ReadLine();
            int    inputQ7 = Int32.Parse(inputS7);
            string result  = questionSeven.NumbersToWords(inputQ7);

            Console.WriteLine($"{inputS7} is: {result}");

            Console.ReadLine();
        }
Exemplo n.º 2
0
        public void Test1()
        {
            QuestionSeven questionSeven = new QuestionSeven();

            Assert.Equal("five", questionSeven.NumbersToWords(5));
        }
Exemplo n.º 3
0
        public void TestNegative()
        {
            QuestionSeven questionSeven = new QuestionSeven();

            Assert.Equal("negative seventy-two", questionSeven.NumbersToWords(-72));
        }
Exemplo n.º 4
0
        public void TestBig()
        {
            QuestionSeven questionSeven = new QuestionSeven();

            Assert.Equal("fivehundred and forty-threethousand ninehundred and eighty-seven", questionSeven.NumbersToWords(543987));
        }
Exemplo n.º 5
0
        public void Test2()
        {
            QuestionSeven questionSeven = new QuestionSeven();

            Assert.Equal("ninehundred and forty-three", questionSeven.NumbersToWords(943));
        }