Skip to content

Commit 533421e

Browse files
committed
More unit test fixes; joda, xml ones not getting registered
1 parent d971c49 commit 533421e

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

src/main/java/com/fasterxml/jackson/databind/ext/JodaSerializers.java

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* Since version 1.5, more types are supported. These types use slightly
2222
* different approach to serialization than core date types: "timestamp"
2323
* notation is implemented using JSON arrays, for improved readability.
24-
*
25-
* @since 1.4
2624
*/
2725
public class JodaSerializers
2826
implements Provider<Map.Entry<Class<?>,JsonSerializer<?>>>

src/test/java/com/fasterxml/jackson/databind/jsontype/TestDefaultForEnums.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void testSimpleEnumsInObjectArray() throws Exception
5858

5959
// Typing is needed for enums
6060
String json = m.writeValueAsString(new Object[] { TestEnum.A });
61-
assertEquals("[[\"org.codehaus.jackson.map.jsontype.TestDefaultForEnums$TestEnum\",\"A\"]]", json);
61+
assertEquals("[[\"com.fasterxml.jackson.databind.jsontype.TestDefaultForEnums$TestEnum\",\"A\"]]", json);
6262

6363
// and let's verify we get it back ok as well:
6464
Object[] value = m.readValue(json, Object[].class);
@@ -71,7 +71,7 @@ public void testSimpleEnumsAsField() throws Exception
7171
ObjectMapper m = new ObjectMapper();
7272
m.enableDefaultTyping();
7373
String json = m.writeValueAsString(new EnumHolder(TestEnum.B));
74-
assertEquals("{\"value\":[\"org.codehaus.jackson.map.jsontype.TestDefaultForEnums$TestEnum\",\"B\"]}", json);
74+
assertEquals("{\"value\":[\"com.fasterxml.jackson.databind.jsontype.TestDefaultForEnums$TestEnum\",\"B\"]}", json);
7575
EnumHolder holder = m.readValue(json, EnumHolder.class);
7676
assertSame(TestEnum.B, holder.value);
7777
}

src/test/java/com/fasterxml/jackson/databind/jsontype/TestDefaultForObject.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public void testFeature432() throws Exception
326326
ObjectMapper mapper = new ObjectMapper();
327327
mapper.enableDefaultTypingAsProperty(ObjectMapper.DefaultTyping.OBJECT_AND_NON_CONCRETE, "*CLASS*");
328328
String json = mapper.writeValueAsString(new BeanHolder(new StringBean("punny")));
329-
assertEquals("{\"bean\":{\"*CLASS*\":\"org.codehaus.jackson.map.jsontype.TestDefaultForObject$StringBean\",\"name\":\"punny\"}}", json);
329+
assertEquals("{\"bean\":{\"*CLASS*\":\"com.fasterxml.jackson.databind.jsontype.TestDefaultForObject$StringBean\",\"name\":\"punny\"}}", json);
330330
}
331331

332332
/*

src/test/java/com/fasterxml/jackson/databind/jsontype/TestSubtypes.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void testEmptyBean() throws Exception
145145
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
146146
mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
147147
json = mapper.writeValueAsString(new EmptyNonFinal());
148-
assertEquals("[\"org.codehaus.jackson.map.jsontype.TestSubtypes$EmptyNonFinal\",{}]", json);
148+
assertEquals("[\"com.fasterxml.jackson.databind.jsontype.TestSubtypes$EmptyNonFinal\",{}]", json);
149149
}
150150

151151
public void testDefaultImpl() throws Exception

src/test/java/com/fasterxml/jackson/databind/jsontype/TestTypedSerialization.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void testTypedMaps() throws Exception
196196
list.add(new A());
197197
map.put(1L, list);
198198
String json = mapper.writerWithType(new TypeReference<Map<Long, Collection<Super>>>() {}).writeValueAsString(map);
199-
assertTrue(json, json.contains("@class"));
199+
assertTrue("JSON does not contain '@class': "+json, json.contains("@class"));
200200
}
201201
}
202202

src/test/java/com/fasterxml/jackson/databind/type/TestTypeFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public void testCanonicalNames()
268268
// And then EnumMap (actual use case for us)
269269
t = tf.constructMapType(EnumMap.class, EnumForCanonical.class, String.class);
270270
can = t.toCanonical();
271-
assertEquals("java.util.EnumMap<org.codehaus.jackson.map.type.TestTypeFactory$EnumForCanonical,java.lang.String>",
271+
assertEquals("java.util.EnumMap<com.fasterxml.jackson.databind.type.TestTypeFactory$EnumForCanonical,java.lang.String>",
272272
can);
273273
assertEquals(t, TypeFactory.fromCanonical(can));
274274

0 commit comments

Comments
 (0)