Examples of EnglishNumberFormat


Examples of org.apache.archiva.redback.components.cache.test.EnglishNumberFormat

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 ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.