Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 7588e9e

Browse files
committed
249: Remove deprecated elements
Task-Url: https://github.com/JavaMoney/jsr354-ri/issues/issues/249
1 parent 68976d5 commit 7588e9e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/test/java/org/javamoney/moneta/format/MonetaryFormatsTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717

1818
import static org.testng.Assert.assertEquals;
1919

20+
import java.math.BigDecimal;
2021
import java.util.Locale;
2122

2223
import javax.money.MonetaryAmount;
2324
import javax.money.format.AmountFormatQueryBuilder;
2425
import javax.money.format.MonetaryAmountFormat;
2526
import javax.money.format.MonetaryFormats;
2627

28+
import org.javamoney.moneta.Money;
2729
import org.testng.annotations.Test;
2830

2931
public class MonetaryFormatsTest {
@@ -53,4 +55,20 @@ public void testParseFR() {
5355
assertEquals(amountOk.getNumber().doubleValueExact(), 123.01); // OK
5456
assertEquals(amountKo.getNumber().doubleValueExact(), 14000.12); // KO
5557
}
58+
59+
/**
60+
* Test related to parsing and formatting for India.
61+
* https://github.com/JavaMoney/jsr354-ri/issues/275
62+
*/
63+
@Test(enabled=false)
64+
public void testRupeeFormatting() {
65+
BigDecimal amount = new BigDecimal("67890000000000");
66+
Locale india = new Locale("en, IN");
67+
68+
MonetaryAmountFormat format = MonetaryFormats.getAmountFormat(india);
69+
Money money = Money.of(amount, "INR");
70+
String expectedFormattedString = "INR 6,78,90,00,00,00,000.00";
71+
assertEquals(format.format(money), expectedFormattedString);
72+
assertEquals(money, Money.parse(expectedFormattedString, format));
73+
}
5674
}

0 commit comments

Comments
 (0)