@@ -268,31 +268,21 @@ public void testLowerCaseUnchangedNames() throws Exception
268
268
*/
269
269
public void testPascalCaseStandAlone ()
270
270
{
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" ));
286
275
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
+ }
291
279
280
+ // [databind#428]
281
+ public void testIssue428PascalWithOverrides () throws Exception
282
+ {
292
283
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 ());
296
286
if (!json .contains (quote ("fooBar" ))) {
297
287
fail ("Should use name 'fooBar', does not: " +json );
298
288
}
@@ -303,10 +293,8 @@ public void testIssue428PascalWithOverrides() throws Exception {
303
293
/* Test methods for LOWER_CASE
304
294
/**********************************************************
305
295
*/
306
-
307
- /**
308
- * For [databind#461]
309
- */
296
+
297
+ // For [databind#461]
310
298
public void testSimpleLowerCase () throws Exception
311
299
{
312
300
final BoringBean input = new BoringBean ();
0 commit comments