1
- package com .fasterxml .jackson .failing ;
1
+ package com .fasterxml .jackson .databind . deser . creators ;
2
2
3
3
import com .fasterxml .jackson .annotation .JsonCreator ;
4
4
import com .fasterxml .jackson .databind .*;
5
5
import com .fasterxml .jackson .databind .introspect .AnnotatedMember ;
6
6
import com .fasterxml .jackson .databind .introspect .AnnotatedParameter ;
7
7
import com .fasterxml .jackson .databind .introspect .JacksonAnnotationIntrospector ;
8
8
9
- public class CreatorWithNamingStrategy2008Test extends BaseMapTest
9
+ public class CreatorWithNamingStrategyTest extends BaseMapTest
10
10
{
11
11
@ SuppressWarnings ("serial" )
12
12
static class MyParamIntrospector extends JacksonAnnotationIntrospector
@@ -21,7 +21,7 @@ public String findImplicitPropertyName(AnnotatedMember param) {
21
21
}
22
22
}
23
23
24
- // wrt [https://github.com/FasterXML/jackson-modules-java8/issues/67 ]
24
+ // [databind#2051 ]
25
25
static class OneProperty {
26
26
public String paramName0 ;
27
27
@@ -37,18 +37,17 @@ public OneProperty(String bogus) {
37
37
/**********************************************************
38
38
*/
39
39
40
- private final ObjectMapper MAPPER = objectMapper ()
40
+ private final ObjectMapper MAPPER = newObjectMapper ()
41
41
.setAnnotationIntrospector (new MyParamIntrospector ())
42
42
.setPropertyNamingStrategy (PropertyNamingStrategy .SNAKE_CASE )
43
43
;
44
44
45
- // Possibly [databind#2008], but originally
46
- // wrt [https://github.com/FasterXML/jackson-modules-java8/issues/67]
45
+ // [databind#2051]
47
46
public void testSnakeCaseWithOneArg () throws Exception
48
47
{
49
48
final String MSG = "1st" ;
50
49
OneProperty actual = MAPPER .readValue (
51
- "{\" first_property \" :\" " +MSG +"\" }" ,
50
+ "{\" param_name0 \" :\" " +MSG +"\" }" ,
52
51
OneProperty .class );
53
52
assertEquals ("CTOR:" +MSG , actual .paramName0 );
54
53
}
0 commit comments