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(); }
public void Test1() { QuestionSeven questionSeven = new QuestionSeven(); Assert.Equal("five", questionSeven.NumbersToWords(5)); }
public void TestNegative() { QuestionSeven questionSeven = new QuestionSeven(); Assert.Equal("negative seventy-two", questionSeven.NumbersToWords(-72)); }
public void TestBig() { QuestionSeven questionSeven = new QuestionSeven(); Assert.Equal("fivehundred and forty-threethousand ninehundred and eighty-seven", questionSeven.NumbersToWords(543987)); }
public void Test2() { QuestionSeven questionSeven = new QuestionSeven(); Assert.Equal("ninehundred and forty-three", questionSeven.NumbersToWords(943)); }