public void testNumberToStringLocale(){
  Locale defaultLocale=Locale.getDefault();
  Locale.setDefault(Locale.US);
  NumberConverter converter=makeConverter();
  converter.setUseLocaleFormat(true);
  assertEquals("Default Locale " + numbers[0],"-12",converter.convert(String.class,numbers[0]));
  assertEquals("Default Locale " + numbers[1],"13",converter.convert(String.class,numbers[1]));
  converter.setLocale(Locale.GERMAN);
  assertEquals("Locale.GERMAN " + numbers[2],"-22",converter.convert(String.class,numbers[2]));
  assertEquals("Locale.GERMAN " + numbers[3],"23",converter.convert(String.class,numbers[3]));
  Locale.setDefault(defaultLocale);
}

public void testNumberToStringLocale ( ) { Locale defaultLocale = Locale . getDefault ( ) ; Locale . setDefault ( Locale . US ) ; NumberConverter converter = makeConverter ( ) ; converter . setUseLocaleFormat ( true ) ; assertEquals ( "Default Locale " + numbers [ 0 ] , "-12" , converter . convert ( String . class , numbers [ 0 ] ) ) ; assertEquals ( "Default Locale " + numbers [ 1 ] , "13" , converter . convert ( String . class , numbers [ 1 ] ) ) ; converter . setLocale ( Locale . GERMAN ) ; assertEquals ( "Locale.GERMAN " + numbers [ 2 ] , "-22" , converter . convert ( String . class , numbers [ 2 ] ) ) ; assertEquals ( "Locale.GERMAN " + numbers [ 3 ] , "23" , converter . convert ( String . class , numbers [ 3 ] ) ) ; Locale . setDefault ( defaultLocale ) ; }
convert number - - > string ( using default and specified locales )
