Examples of BigMoney


Examples of org.joda.money.BigMoney

  @Override
  public Object deepCopy(Object value) throws HibernateException {
    if(value==null)
      return null;
    BigMoney money = (BigMoney)value;
    return BigMoney.of(money);
  }
View Full Code Here

Examples of org.joda.money.BigMoney

    //-----------------------------------------------------------------------
    // parseBigMoney(CharSequence)
    //-----------------------------------------------------------------------
    public void test_parseBigMoney_CharSequence() {
        CharSequence input = new StringBuilder("12.34 GBP");
        BigMoney test = iParseTest.parseBigMoney(input);
        assertEquals(test, MONEY_GBP_12_34.toBigMoney());
    }
View Full Code Here

Examples of org.joda.money.BigMoney

    @Test(dataProvider = "appendAmount_MoneyAmountStyle")
    public void test_appendAmount_MoneyAmountStyle_GBP(
            MoneyAmountStyle style, String amount, String expected) {
        iBuilder.appendAmount(style);
        MoneyFormatter test = iBuilder.toFormatter();
        BigMoney money = BigMoney.of(GBP, new BigDecimal(amount));
        assertEquals(test.print(money), expected);
        assertEquals(test.parse(expected, 0).getAmount(), money.getAmount());
    }
View Full Code Here

Examples of org.joda.money.BigMoney

    @Test(dataProvider = "appendAmount_MoneyAmountStyle")
    public void test_appendAmount_MoneyAmountStyle_JPY(
            MoneyAmountStyle style, String amount, String expected) {
        iBuilder.appendAmount(style);
        MoneyFormatter test = iBuilder.toFormatter();
        BigMoney money = BigMoney.of(JPY, new BigDecimal(amount));
        assertEquals(test.print(money), expected);
        assertEquals(test.parse(expected, 0).getAmount(), money.getAmount());
    }
View Full Code Here

Examples of org.joda.money.BigMoney

    @Test(dataProvider = "appendAmount_MoneyAmountStyle")
    public void test_appendAmount_MoneyAmountStyle_BHD(
            MoneyAmountStyle style, String amount, String expected) {
        iBuilder.appendAmount(style);
        MoneyFormatter test = iBuilder.toFormatter();
        BigMoney money = BigMoney.of(BHD, new BigDecimal(amount));
        assertEquals(test.print(money), expected);
        assertEquals(test.parse(expected, 0).getAmount(), money.getAmount());
    }
View Full Code Here

Examples of org.joda.money.BigMoney

        checkNotNull(moneyProvider, "BigMoneyProvider must not be null");
        if (isPrinter() == false) {
            throw new UnsupportedOperationException("MoneyFomatter has not been configured to be able to print");
        }
       
        BigMoney money = BigMoney.of(moneyProvider);
        MoneyPrintContext context = new MoneyPrintContext(locale);
        for (MoneyPrinter printer : printers) {
            printer.print(context, appendable, money);
        }
    }
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.