public void ConvertNumber_ConvertsA10To12DigitFrom1000000000To999999999999_String() { NumberToConvert newNumberToConvert = new NumberToConvert(123234654321); newNumberToConvert.ConvertNumber(); Assert.AreEqual("one hundred twenty three billion two hundred thirty four million six hundred fifty four thousand three hundred twenty one", newNumberToConvert.StringNumber); }
public void ConvertNumber_ConvertsAFourToSixDigitFrom1000To999999_String() { NumberToConvert newNumberToConvert = new NumberToConvert(654321); newNumberToConvert.ConvertNumber(); Assert.AreEqual("six hundred fifty four thousand three hundred twenty one", newNumberToConvert.StringNumber); }
public void ConvertNumber_ConvertsATripleDigitFrom100To999_String() { NumberToConvert newNumberToConvert = new NumberToConvert(367); newNumberToConvert.ConvertNumber(); Assert.AreEqual("three hundred sixty seven", newNumberToConvert.StringNumber); }
public void ConvertNumber_ConvertsADoubleDigitFrom20To99_String() { NumberToConvert newNumberToConvert = new NumberToConvert(20); newNumberToConvert.ConvertNumber(); Assert.AreEqual("twenty", newNumberToConvert.StringNumber); }
public void ConvertNumber_ConvertsADoubleDigitFrom10to19_String() { NumberToConvert newNumberToConvert = new NumberToConvert(14); newNumberToConvert.ConvertNumber(); Assert.AreEqual("fourteen", newNumberToConvert.StringNumber); }
public void ConvertNumber_ConvertsASingleDigit_One() { NumberToConvert newNumberToConvert = new NumberToConvert(1); newNumberToConvert.ConvertNumber(); Assert.AreEqual("one", newNumberToConvert.StringNumber); }
public ActionResult ConvertTheNumber(string numberToConvert) { long num = long.Parse(numberToConvert); NumberToConvert userNum = new NumberToConvert(num); userNum.ConvertNumber(); return(RedirectToAction("/convert", userNum)); }
public static void Main() { Console.WriteLine("Input number to convert"); long input = long.Parse(Console.ReadLine()); NumberToConvert numObj = new NumberToConvert(input); numObj.ConvertNumber(); Console.WriteLine(numObj.StringNumber); }