コード例 #1
0
 def testNumbersToWordsConversionMillionAndHundredThousand(self):
     given_string = '$1100121.09'
     expected_result = 'one million one hundred thousand one hundred twenty one dollar and nine cents'
     actual_result = NumbersToWordsConversion().numbers_to_words_conversion(
         given_string)
     self.assertEqual(expected_result, actual_result)
コード例 #2
0
 def testNumbersToWordsConversionZeroTens(self):
     given_string = '$101.09'
     expected_result = 'one hundred one dollar and nine cents'
     actual_result = NumbersToWordsConversion().numbers_to_words_conversion(
         given_string)
     self.assertEqual(expected_result, actual_result)
コード例 #3
0
 def testNumbersToWordsConversionPluralDollars(self):
     given_string = '$122.09'
     expected_result = 'one hundred twenty two dollars and nine cents'
     actual_result = NumbersToWordsConversion().numbers_to_words_conversion(
         given_string)
     self.assertEqual(expected_result, actual_result)
コード例 #4
0
 def testNumbersToWordsConversionSingleCent(self):
     given_string = '$121.31'
     expected_result = 'one hundred twenty one dollar and thirty one cent'
     actual_result = NumbersToWordsConversion().numbers_to_words_conversion(
         given_string)
     self.assertEqual(expected_result, actual_result)
コード例 #5
0
 def testNumbersToWordsConversionTwelveMillion(self):
     given_string = '$12000121.09'
     expected_result = 'twelve million one hundred twenty one dollar and nine cents'
     actual_result = NumbersToWordsConversion().numbers_to_words_conversion(
         given_string)
     self.assertEqual(expected_result, actual_result)