Skip to content

Commit 4ecf483

Browse files
committed
test fixes
1 parent 1c5287c commit 4ecf483

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/failing/YearDeser78Test.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@
1717
package com.fasterxml.jackson.datatype.jsr310.failing;
1818

1919
import java.time.Year;
20-
import java.time.temporal.Temporal;
2120

2221
import com.fasterxml.jackson.annotation.JsonFormat;
2322
import com.fasterxml.jackson.databind.ObjectMapper;
24-
import com.fasterxml.jackson.datatype.jsr310.MockObjectConfiguration;
2523
import com.fasterxml.jackson.datatype.jsr310.ModuleTestBase;
2624

2725
import org.junit.Test;
2826

2927
import static org.junit.Assert.assertEquals;
30-
import static org.junit.Assert.assertTrue;
3128

3229
public class YearDeser78Test extends ModuleTestBase
3330
{
@@ -36,6 +33,7 @@ final static class ObjectTest {
3633
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "'Y'yyyy")
3734
public Year value;
3835

36+
protected ObjectTest() { }
3937
public ObjectTest(Year y) {
4038
value = y;
4139
}
@@ -49,7 +47,7 @@ public void testWithCustomFormat() throws Exception
4947
{
5048
ObjectTest input = new ObjectTest(Year.of(2018));
5149
String json = MAPPER.writeValueAsString(input);
52-
assertEquals("{\"customYear\":\"Y2018\"}", json);
50+
assertEquals("{\"value\":\"Y2018\"}", json);
5351
ObjectTest result = MAPPER.readValue(json, ObjectTest.class);
5452
assertEquals(input, result);
5553
}

0 commit comments

Comments
 (0)