public class EnglishNumberFormatTest
extends TestCase
{
public void testConversion()
{
EnglishNumberFormat fmt = new EnglishNumberFormat();
assertEquals( "zero", fmt.toText( 0 ) );
assertEquals( "one", fmt.toText( 1 ) );
assertEquals( "fourty two", fmt.toText( 42 ) );
assertEquals( "one hundred", fmt.toText( 100 ) );
assertEquals( "one thousand twenty four", fmt.toText( 1024 ) );
assertEquals( "one million eight hundred twenty two", fmt.toText( 1000822 ) );
assertEquals( "sixteen million four hundred twenty thousand eight hundred sixty one", fmt.toText( 16420861 ) );
}