33import org .junit .Assert ;
44import org .junit .Test ;
55
6+ import java .math .BigDecimal ;
67import java .text .DecimalFormat ;
78import java .text .DecimalFormatSymbols ;
89import java .text .NumberFormat ;
@@ -32,7 +33,7 @@ public void givenDifferentLocalesAndDoubleAmount_whenCurrencyInstance_thenDiffer
3233 Locale usLocale = Locale .US ;
3334 Locale plLocale = new Locale ("pl" , "PL" );
3435 Locale deLocale = Locale .GERMANY ;
35- double number = 102_300.456d ;
36+ BigDecimal number = new BigDecimal ( 102_300.456d ) ;
3637
3738 NumberFormat usNumberFormat = NumberFormat .getCurrencyInstance (usLocale );
3839 NumberFormat plNumberFormat = NumberFormat .getCurrencyInstance (plLocale );
@@ -46,7 +47,7 @@ public void givenDifferentLocalesAndDoubleAmount_whenCurrencyInstance_thenDiffer
4647 @ Test
4748 public void givenLocaleAndNumber_whenSpecificDecimalFormat_thenSpecificOutput () {
4849 Locale .setDefault (Locale .FRANCE );
49- double number = 102_300.456d ;
50+ BigDecimal number = new BigDecimal ( 102_300.456d ) ;
5051
5152 DecimalFormat zeroDecimalFormat = new DecimalFormat ("000000000.0000" );
5253 DecimalFormat hashDecimalFormat = new DecimalFormat ("###,###.#" );
@@ -60,7 +61,7 @@ public void givenLocaleAndNumber_whenSpecificDecimalFormat_thenSpecificOutput()
6061 @ Test
6162 public void givenLocaleAndNumber_whenSpecificDecimalFormatSymbols_thenSpecificOutput () {
6263 Locale .setDefault (Locale .FRANCE );
63- double number = 102_300.456d ;
64+ BigDecimal number = new BigDecimal ( 102_300.456d ) ;
6465
6566 DecimalFormatSymbols decimalFormatSymbols = DecimalFormatSymbols .getInstance ();
6667 decimalFormatSymbols .setGroupingSeparator ('^' );
0 commit comments