public void testLocale(){
  Locale defaultLocale=Locale.getDefault();
  Locale.setDefault(Locale.US);
  String pattern="M/d/yy";
  DateTimeConverter converter=makeConverter();
  converter.setUseLocaleFormat(true);
  String testString="10/28/06";
  Object expected=toType(testString,pattern,null);
  validConversion(converter,expected,testString);
  invalidConversion(converter,null);
  invalidConversion(converter,"");
  invalidConversion(converter,"2006-10-2X");
  invalidConversion(converter,"10.28.06");
  invalidConversion(converter,"10-28-06");
  invalidConversion(converter,new Integer(2));
  Locale.setDefault(defaultLocale);
}

public void testLocale ( ) { Locale defaultLocale = Locale . getDefault ( ) ; Locale . setDefault ( Locale . US ) ; String pattern = "M/d/yy" ; DateTimeConverter converter = makeConverter ( ) ; converter . setUseLocaleFormat ( true ) ; String testString = "10/28/06" ; Object expected = toType ( testString , pattern , null ) ; validConversion ( converter , expected , testString ) ; invalidConversion ( converter , null ) ; invalidConversion ( converter , "" ) ; invalidConversion ( converter , "2006-10-2X" ) ; invalidConversion ( converter , "10.28.06" ) ; invalidConversion ( converter , "10-28-06" ) ; invalidConversion ( converter , new Integer ( 2 ) ) ; Locale . setDefault ( defaultLocale ) ; }
test date converter with no default value
