Skip to content

Commit

Permalink
Add test case for formatting JPY
Browse files Browse the repository at this point in the history
See #49
See #43
  • Loading branch information
jodastephen committed Nov 7, 2014
1 parent 093489b commit a6a7ec9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/org/joda/money/format/TestMoneyFormatterBuilder.java
Expand Up @@ -621,6 +621,17 @@ public void test_appendAmount_MoneyAmountStyle_BHD(
assertEquals(test.parse(expected, 0).getAmount(), money.getAmount());
}

@Test
public void test_appendAmount_MoneyAmountStyle_JPY_issue49() {
Money money = Money.parse("JPY 12");
MoneyAmountStyle style = MoneyAmountStyle.LOCALIZED_GROUPING;
MoneyFormatter formatter = new MoneyFormatterBuilder()
.appendAmount(style)
.toFormatter()
.withLocale(Locale.JAPAN);
assertEquals(formatter.print(money), "12");
}

//-----------------------------------------------------------------------
public void test_append_MoneyPrinterMoneyParser_printer() {
MoneyPrinter printer = new MoneyPrinter() {
Expand Down

0 comments on commit a6a7ec9

Please sign in to comment.