public void ConvertRubToUsd_NineThousandNineHundredNinetyNine() { String actual = StrEdit.ConvertRubToUsd("Nine thousand nine hundred ninety NINE"); String expected = "nineteen thousand nine hundred ninety eight"; Assert.AreEqual(expected, actual); }
public void ConvertRubToUsd_nine() { String actual = StrEdit.ConvertRubToUsd("nine"); String expected = "eighteen"; Assert.AreEqual(expected, actual); }
public void ConvertRubToUsd_TwentyNine() { String actual = StrEdit.ConvertRubToUsd("twenty NINE"); String expected = "fifty eight"; Assert.AreEqual(expected, actual); }
/* * "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "hundred", "thousand", * "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty", * "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" */ static void Main(string[] args) { int k = 0; while (k != 3) { Menu(); string str = null; k = Convert.ToInt16(Console.ReadLine()); switch (k) { case 1: Console.Write("Введите предложение: "); str = Console.ReadLine(); Console.WriteLine("Исправленное предложение: " + StrEdit.ConvertLettersUp(str)); break; case 2: Console.Write("Enter the amount in rubles: "); str = Console.ReadLine(); Console.WriteLine("Amount in usd: " + StrEdit.ConvertRubToUsd(str) + " $"); break; case 3: break; default: Console.WriteLine("Нет такого пункта!"); break; } Console.ReadKey(); } }