@@ -194,7 +194,8 @@ public void testDeserializationFromString01() throws Exception
194
194
value = READER .readValue ('"' + time .toString () + '"' );
195
195
assertEquals (time , value , "The value is not correct." );
196
196
197
- expectSuccess (OffsetTime .of (12 , 0 , 0 , 0 , ZoneOffset .UTC ), "'12:00Z'" );
197
+ assertEquals (OffsetTime .of (12 , 0 , 0 , 0 , ZoneOffset .UTC ),
198
+ read ("'12:00Z'" ));
198
199
}
199
200
200
201
@ Test
@@ -286,7 +287,7 @@ public void testDeserializationAsArrayEnabled() throws Throwable
286
287
{
287
288
OffsetTime value = READER .with (DeserializationFeature .UNWRAP_SINGLE_VALUE_ARRAYS )
288
289
.readValue (a2q ("['12:00Z']" ));
289
- expect (OffsetTime .of (12 , 0 , 0 , 0 , ZoneOffset .UTC ), value );
290
+ assertEquals (OffsetTime .of (12 , 0 , 0 , 0 , ZoneOffset .UTC ), value );
290
291
}
291
292
292
293
@ Test
@@ -354,21 +355,7 @@ private void expectFailure(String json) throws Throwable {
354
355
}
355
356
}
356
357
357
- private void expectSuccess (Object exp , String json ) throws IOException {
358
- final OffsetTime value = read (json );
359
- assertNotNull (value , "The value should not be null." );
360
- assertEquals (exp , value , "The value is not correct." );
361
- }
362
-
363
358
private OffsetTime read (final String json ) throws IOException {
364
359
return READER .readValue (a2q (json ));
365
360
}
366
-
367
- private static void notNull (Object value ) {
368
- assertNotNull (value , "The value should not be null." );
369
- }
370
-
371
- private static void expect (Object exp , Object value ) {
372
- assertEquals (exp , value , "The value is not correct." );
373
- }
374
361
}
0 commit comments