File tree 1 file changed +10
-7
lines changed
src/test/java/com/fasterxml/jackson/failing
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,19 @@ enum Example2 {
21
21
Example2 (int x ) { this .x = x ; }
22
22
}
23
23
24
- public void testEnumFromInt1850 () throws Exception
24
+ private final ObjectMapper MAPPER = newJsonMapper ();
25
+
26
+ public void testEnumFromInt1850Method () throws Exception
25
27
{
26
- final ObjectMapper mapper = newJsonMapper ();
27
-
28
- String json = mapper .writeValueAsString (Example1 .A );
29
- Example1 e1 = mapper .readValue (json , Example1 .class );
28
+ String json = MAPPER .writeValueAsString (Example1 .A );
29
+ Example1 e1 = MAPPER .readValue (json , Example1 .class );
30
30
assertEquals (Example1 .A , e1 );
31
+ }
31
32
32
- json = mapper .writeValueAsString (Example2 .A );
33
- Example2 e2 = mapper .readValue (json , Example2 .class );
33
+ public void testEnumFromInt1850Field () throws Exception
34
+ {
35
+ String json = MAPPER .writeValueAsString (Example2 .A );
36
+ Example2 e2 = MAPPER .readValue (json , Example2 .class );
34
37
assertEquals (Example2 .A , e2 );
35
38
}
36
39
}
You can’t perform that action at this time.
0 commit comments