public void ConvertsNegativeNumbersToWords() { Assert.Equal("negative eight hundred", NumberToWordConverter.Convert(-800)); Assert.Equal("negative one hundred million four hundred fifty six thousand three hundred ninety six", NumberToWordConverter.Convert(-100456396)); Assert.Equal("negative three hundred thousand thirteen", NumberToWordConverter.Convert(-300013)); Assert.Equal("negative one", NumberToWordConverter.Convert(-1)); Assert.Equal("negative one billion", NumberToWordConverter.Convert(-1000000000)); }
public void ConvertsPositiveNumbersToWords() { Assert.Equal("eight hundred", NumberToWordConverter.Convert(800)); Assert.Equal("one hundred million four hundred fifty six thousand three hundred ninety six", NumberToWordConverter.Convert(100456396)); Assert.Equal("three hundred thousand thirteen", NumberToWordConverter.Convert(300013)); Assert.Equal("one", NumberToWordConverter.Convert(1)); Assert.Equal("one billion", NumberToWordConverter.Convert(1000000000)); }
public void ConvertsZeroes() { Assert.Equal("zero", NumberToWordConverter.Convert(0)); Assert.Equal(0, WordToNumberConverter.Convert("zero")); }