Package com.habitsoft.kiyaa.server

Examples of com.habitsoft.kiyaa.server.ServerLocalizedParser.formatCurrency()


public class TestServerLocalizedParser extends TestCase {

    public void testCurrencyFormatting() throws Exception {
        ServerLocalizedParser parser = new ServerLocalizedParser(Locale.US);
        GwtTestLocalizedParser.assertEquals("$1.23", parser.formatCurrency(123, "USD", false, false));
        GwtTestLocalizedParser.assertEquals(-123, parser.parseCurrency("($1.23)", "USD"));
        GwtTestLocalizedParser.assertEquals(123, parser.parseCurrency("$1.23", "USD"));
        /* None of these are supported - the parser is very strict
        assertEquals(123, parser.parseCurrency("$-1.23", "USD"));
        assertEquals(123, parser.parseCurrency("$1.23", "USD"));
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.