@@ -142,8 +142,7 @@ private Class<?> _materializeRawType(AbstractTypeMaterializer mat,
142142 */
143143 public void testSimpleInteface () throws Exception
144144 {
145- ObjectMapper mapper = new ObjectMapper ();
146- mapper .registerModule (new MrBeanModule ());
145+ ObjectMapper mapper = newMrBeanMapper ();
147146 Bean bean = mapper .readValue ("{\" a\" :\" value\" ,\" x\" :123 }" , Bean .class );
148147 assertNotNull (bean );
149148 assertEquals ("value" , bean .getA ());
@@ -155,8 +154,7 @@ public void testSimpleInteface() throws Exception
155154 */
156155 public void testBeanHolder () throws Exception
157156 {
158- ObjectMapper mapper = new ObjectMapper ();
159- mapper .registerModule (new MrBeanModule ());
157+ ObjectMapper mapper = newMrBeanMapper ();
160158 BeanHolder holder = mapper .readValue ("{\" bean\" :{\" a\" :\" b\" ,\" x\" :-4 }}" , BeanHolder .class );
161159 assertNotNull (holder );
162160 Bean bean = holder .getBean ();
@@ -167,8 +165,7 @@ public void testBeanHolder() throws Exception
167165
168166 public void testArrayInterface () throws Exception
169167 {
170- ObjectMapper mapper = new ObjectMapper ();
171- mapper .registerModule (new MrBeanModule ());
168+ ObjectMapper mapper = newMrBeanMapper ();
172169 ArrayBean bean = mapper .readValue ("{\" values\" :[1,2,3], \" words\" : [ \" cool\" , \" beans\" ] }" ,
173170 ArrayBean .class );
174171 assertNotNull (bean );
@@ -178,15 +175,15 @@ public void testArrayInterface() throws Exception
178175
179176 public void testSubInterface () throws Exception
180177 {
181- ObjectMapper mapper = new ObjectMapper ();
182- mapper .registerModule (new MrBeanModule ());
178+ ObjectMapper mapper = newMrBeanMapper ();
183179 BeanWithY bean = mapper .readValue ("{\" a\" :\" b\" ,\" x\" :1, \" y\" :2 }" , BeanWithY .class );
184180 assertNotNull (bean );
185181 assertEquals ("b" , bean .getA ());
186182 assertEquals (1 , bean .getX ());
187183 assertEquals (2 , bean .getY ());
188184 }
189185
186+ // [modules-base#109]
190187 public void testDefaultMethodInInterface () throws Exception
191188 {
192189 ObjectMapper mapper = newMrBeanMapper ();
@@ -197,6 +194,7 @@ public void testDefaultMethodInInterface() throws Exception
197194 assertTrue (bean .anyValuePresent ());
198195 }
199196
197+ // [modules-base#109]
200198 public void testInheritedDefaultMethodInInterface () throws Exception
201199 {
202200 ObjectMapper mapper = newMrBeanMapper ();
@@ -235,7 +233,7 @@ public void testPartialBean() throws Exception
235233 }
236234 }
237235
238- // As per [JACKSON-683]: fail gracefully if super type not public
236+ // Fail gracefully if super type not public
239237 public void testNonPublic () throws Exception
240238 {
241239 ObjectMapper mapper = new ObjectMapper ();
@@ -247,5 +245,4 @@ public void testNonPublic() throws Exception
247245 verifyException (e , "is not public" );
248246 }
249247 }
250-
251248}
0 commit comments