public void testCurrencySymbol() {
Locale locale = new Locale("en", "GB");
String formattedPrice = Currency.getInstance("EUR").getSymbol(locale) + "10.00";
String badFormattedPrice = Currency.getInstance("EUR").getSymbol() + "10.00";
assertEquals(formattedPrice, badFormattedPrice); // fails on OSX!
}Seems a bit weird, but it's sort of logical - you have to pass in your target locale when you get the currency symbol for some other locale.

No comments:
Post a Comment