@@ -268,31 +268,21 @@ public void testLowerCaseUnchangedNames() throws Exception
268268 */
269269 public void testPascalCaseStandAlone ()
270270 {
271- String translatedJavaName = PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField
272- (null , null , "userName" );
273- assertEquals ("UserName" , translatedJavaName );
274-
275- translatedJavaName = PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField
276- (null , null , "User" );
277- assertEquals ("User" , translatedJavaName );
278-
279- translatedJavaName = PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField
280- (null , null , "user" );
281- assertEquals ("User" , translatedJavaName );
282- translatedJavaName = PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField
283- (null , null , "x" );
284- assertEquals ("X" , translatedJavaName );
285- }
271+ assertEquals ("UserName" , PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField (null , null , "userName" ));
272+ assertEquals ("User" , PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField (null , null , "User" ));
273+ assertEquals ("User" , PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField (null , null , "user" ));
274+ assertEquals ("X" , PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField (null , null , "x" ));
286275
287- /**
288- * For [databind#428]
289- */
290- public void testIssue428PascalWithOverrides () throws Exception {
276+ assertEquals ("BADPublicName" , PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForField (null , null , "bADPublicName" ));
277+ assertEquals ("BADPublicName" , PropertyNamingStrategy .UPPER_CAMEL_CASE .nameForGetterMethod (null , null , "bADPublicName" ));
278+ }
291279
280+ // [databind#428]
281+ public void testIssue428PascalWithOverrides () throws Exception
282+ {
292283 String json = new ObjectMapper ()
293- .setPropertyNamingStrategy (PropertyNamingStrategy .UPPER_CAMEL_CASE )
294- .writeValueAsString (new Bean428 ());
295-
284+ .setPropertyNamingStrategy (PropertyNamingStrategy .UPPER_CAMEL_CASE )
285+ .writeValueAsString (new Bean428 ());
296286 if (!json .contains (quote ("fooBar" ))) {
297287 fail ("Should use name 'fooBar', does not: " +json );
298288 }
@@ -303,10 +293,8 @@ public void testIssue428PascalWithOverrides() throws Exception {
303293 /* Test methods for LOWER_CASE
304294 /**********************************************************
305295 */
306-
307- /**
308- * For [databind#461]
309- */
296+
297+ // For [databind#461]
310298 public void testSimpleLowerCase () throws Exception
311299 {
312300 final BoringBean input = new BoringBean ();
0 commit comments