@@ -39,15 +39,15 @@ public void testDeserializationAsString01() throws Exception
39
39
{
40
40
assertEquals ("The value is not correct." ,
41
41
OffsetDateTime .of (2000 , 1 , 1 , 12 , 0 , 0 , 0 , ZoneOffset .UTC ),
42
- READER .readValue (quote ("2000-01-01T12:00Z" )));
42
+ READER .readValue (q ("2000-01-01T12:00Z" )));
43
43
}
44
44
45
45
@ Test
46
46
public void testDeserializationAsString02 () throws Exception
47
47
{
48
48
assertEquals ("The value is not correct." ,
49
49
OffsetDateTime .of (2000 , 1 , 1 , 7 , 0 , 0 , 0 , ZoneOffset .UTC ),
50
- READER .readValue (quote ("2000-01-01T12:00+05:00" )));
50
+ READER .readValue (q ("2000-01-01T12:00+05:00" )));
51
51
}
52
52
53
53
// [modules-java8#34]
@@ -56,7 +56,7 @@ public void testDeserializationWithShortFraction() throws Exception
56
56
{
57
57
assertEquals ("The value is not correct." ,
58
58
OffsetDateTime .of (2017 , 7 , 25 , 20 , 22 , 58 , 800_000_000 , ZoneOffset .UTC ),
59
- READER .readValue (quote ("2017-07-25T20:22:58.8Z" )));
59
+ READER .readValue (q ("2017-07-25T20:22:58.8Z" )));
60
60
}
61
61
62
62
@ Test
@@ -66,7 +66,7 @@ public void testDeserializationAsString03() throws Exception
66
66
// Verify that the offset in the json is preserved when we disable ADJUST_DATES_TO_CONTEXT_TIME_ZONE
67
67
//
68
68
ObjectReader reader2 = newMapper ().disable (DeserializationFeature .ADJUST_DATES_TO_CONTEXT_TIME_ZONE ).readerFor (OffsetDateTime .class );
69
- OffsetDateTime parsed = reader2 .readValue (aposToQuotes ("'2000-01-01T12:00+05:00'" ));
69
+ OffsetDateTime parsed = reader2 .readValue (a2q ("'2000-01-01T12:00+05:00'" ));
70
70
assertEquals ("The value is not correct." ,
71
71
OffsetDateTime .of (2000 , 1 , 1 , 12 , 0 , 0 , 0 , ZoneOffset .ofHours (5 )), parsed ) ;
72
72
}
@@ -94,31 +94,31 @@ public void testDeserializationWithoutContextTimezoneFeatureOverride() throws Ex
94
94
@ Test
95
95
public void testBadDeserializationAsString01 () throws Throwable
96
96
{
97
- expectFailure (quote ("notanoffsetdatetime" ));
97
+ expectFailure (q ("notanoffsetdatetime" ));
98
98
}
99
99
100
100
@ Test
101
101
public void testDeserializationAsWithZeroZoneOffset01 () throws Exception
102
102
{
103
103
assertEquals ("The value is not correct." ,
104
104
OffsetDateTime .of (2000 , 1 , 1 , 12 , 0 , 0 , 0 , ZoneOffset .UTC ),
105
- READER .readValue (quote ("2000-01-01T12:00+00:00" )));
105
+ READER .readValue (q ("2000-01-01T12:00+00:00" )));
106
106
}
107
107
108
108
@ Test
109
109
public void testDeserializationAsWithZeroZoneOffset02 () throws Exception
110
110
{
111
111
assertEquals ("The value is not correct." ,
112
112
OffsetDateTime .of (2000 , 1 , 1 , 12 , 0 , 0 , 0 , ZoneOffset .UTC ),
113
- READER .readValue (quote ("2000-01-01T12:00+0000" )));
113
+ READER .readValue (q ("2000-01-01T12:00+0000" )));
114
114
}
115
115
116
116
@ Test
117
117
public void testDeserializationAsWithZeroZoneOffset03 () throws Exception
118
118
{
119
119
assertEquals ("The value is not correct." ,
120
120
OffsetDateTime .of (2000 , 1 , 1 , 12 , 0 , 0 , 0 , ZoneOffset .UTC ),
121
- READER .readValue (quote ("2000-01-01T12:00+00" )));
121
+ READER .readValue (q ("2000-01-01T12:00+00" )));
122
122
}
123
123
124
124
@ Test
@@ -170,13 +170,13 @@ public void testDeserializationAsEmptyArrayEnabled() throws Throwable
170
170
OffsetDateTime value = READER
171
171
.with (DeserializationFeature .UNWRAP_SINGLE_VALUE_ARRAYS )
172
172
.with (DeserializationFeature .ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT )
173
- .readValue (aposToQuotes (json ));
173
+ .readValue (a2q (json ));
174
174
assertNull (value );
175
175
}
176
176
177
177
private void expectFailure (String json ) throws Exception {
178
178
try {
179
- READER .readValue (aposToQuotes (json ));
179
+ READER .readValue (a2q (json ));
180
180
fail ("expected JsonMappingException" );
181
181
} catch (JsonMappingException e ) {
182
182
Throwable t = e .getCause ();
0 commit comments