MCPcopy Create free account
hub / github.com/apache/fory / testOrgPackage

Method testOrgPackage

java/fory-testsuite/src/test/java/org/test/Org.java:46–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 // test for class name same with package name:
45 // https://github.com/janino-compiler/janino/issues/165
46 @Test
47 public void testOrgPackage() {
48 Fory fory =
49 Fory.builder()
50 .withXlang(false)
51 .withRefTracking(true)
52 // Allow to deserialize objects unknown types,more flexible but less secure.
53 .requireClassRegistration(false)
54 .withDeserializeUnknownClass(true)
55 .withCompatible(true)
56 .withRefTracking(true)
57 .build();
58
59 // If the class name is not Org, it can be serialized normally
60 byte[] bytes = fory.serialize(new Org());
61 Object o = fory.deserialize(bytes);
62 Assert.assertEquals(o.getClass(), Org.class);
63 }
64}

Callers

nothing calls this directly

Calls 10

builderMethod · 0.95
serializeMethod · 0.95
deserializeMethod · 0.95
withRefTrackingMethod · 0.80
withCompatibleMethod · 0.80
withXlangMethod · 0.80
assertEqualsMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected