Skip to content

Commit aec28f0

Browse files
committed
test fixes
1 parent 1445b1d commit aec28f0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/test/java/tools/jackson/databind/jsontype/SealedTypesWithJsonTypeInfoSimpleClassName4061Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void testInnerClass() throws Exception {
134134
@Test
135135
public void testMinimalInnerClass() throws Exception {
136136
String jsonStr =
137-
a2q("{'@c':'.JsonTypeInfoSimpleClassName4061WithSealedTypesTest$MinimalInnerSub4061A'}");
137+
a2q("{'@c':'.SealedTypesWithJsonTypeInfoSimpleClassName4061Test$MinimalInnerSub4061A'}");
138138

139139
// ser
140140
assertEquals(jsonStr, MAPPER.writeValueAsString(new MinimalInnerSub4061A()));

src/test/java/tools/jackson/databind/jsontype/SealedTypesWithSubtypesTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public void testSerialization() throws Exception
239239
assertEquals("{\"@type\":\"typeB\",\"b\":1}", mapper.writeValueAsString(bean));
240240

241241
// and default name ought to be simple class name; with context
242-
assertEquals("{\"@type\":\"TestSubtypesWithSealedTypes$SubD\",\"d\":0}", mapper.writeValueAsString(new SubD()));
242+
assertEquals("{\"@type\":\"SealedTypesWithSubtypesTest$SubD\",\"d\":0}", mapper.writeValueAsString(new SubD()));
243243
}
244244

245245
@Test
@@ -249,7 +249,7 @@ public void testDeserializationNonNamed() throws Exception
249249
// .registerSubtypes(SubC.class)
250250
.build();
251251
// default name should be unqualified class name
252-
SuperType bean = mapper.readValue("{\"@type\":\"TestSubtypesWithSealedTypes$SubC\", \"c\":1}", SuperType.class);
252+
SuperType bean = mapper.readValue("{\"@type\":\"SealedTypesWithSubtypesTest$SubC\", \"c\":1}", SuperType.class);
253253
assertSame(SubC.class, bean.getClass());
254254
assertEquals(1, ((SubC) bean).c);
255255
}
@@ -280,21 +280,21 @@ public void testEmptyBean() throws Exception
280280
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, true)
281281
.build();
282282
String json = mapper.writeValueAsString(new EmptyBean());
283-
assertEquals("{\"@type\":\"TestSubtypesWithSealedTypes$EmptyBean\"}", json);
283+
assertEquals("{\"@type\":\"SealedTypesWithSubtypesTest$EmptyBean\"}", json);
284284

285285
mapper = jsonMapperBuilder()
286286
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
287287
.build();
288288
json = mapper.writeValueAsString(new EmptyBean());
289-
assertEquals("{\"@type\":\"TestSubtypesWithSealedTypes$EmptyBean\"}", json);
289+
assertEquals("{\"@type\":\"SealedTypesWithSubtypesTest$EmptyBean\"}", json);
290290

291291
// and then with defaults
292292
mapper = jsonMapperBuilder()
293293
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
294294
.activateDefaultTyping(NoCheckSubTypeValidator.instance, DefaultTyping.NON_FINAL)
295295
.build();
296296
json = mapper.writeValueAsString(new EmptyNonFinal());
297-
assertEquals("[\"tools.jackson.databind.jsontype.TestSubtypesWithSealedTypes$EmptyNonFinal\",{}]", json);
297+
assertEquals("[\"tools.jackson.databind.jsontype.SealedTypesWithSubtypesTest$EmptyNonFinal\",{}]", json);
298298
}
299299

300300
@Test

src/test/java/tools/jackson/databind/jsontype/SealedTypesWithTypedDeserializationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public void testTypeAsWrapper() throws Exception
177177
ObjectMapper m = jsonMapperBuilder()
178178
.addMixIn(Animal.class, TypeWithWrapper.class)
179179
.build();
180-
String JSON = "{\".TestTypedDeserializationWithSealedTypes$Dog\" : "
180+
String JSON = "{\".SealedTypesWithTypedDeserializationTest$Dog\" : "
181181
+asJSONObjectValueString(m, "name", "Scooby", "boneCount", "6")+" }";
182182
Animal a = m.readValue(JSON, Animal.class);
183183
assertTrue(a instanceof Animal);

src/test/java/tools/jackson/databind/jsontype/SealedTypesWithTypedSerializationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void testTypeAsWrapper() throws Exception
115115
// should get a wrapper; keyed by minimal class name ("Cat" here)
116116
assertEquals(1, result.size());
117117
// minimal class name is prefixed by dot, and for inner classes it's bit longer
118-
Map<?,?> cat = (Map<?,?>) result.get(".TestTypedSerializationWithSealedTypes$Cat");
118+
Map<?,?> cat = (Map<?,?>) result.get(".SealedTypesWithTypedSerializationTest$Cat");
119119
assertNotNull(cat);
120120
assertEquals(2, cat.size());
121121
assertEquals("Venla", cat.get("name"));

0 commit comments

Comments
 (0)