public void JsonSerializer_Serialize_hooks_on_base_class() { var original = new HookTestClass(); var json = JsonSerializer.SerializeToString <HookTestClass>(original); Assert.That(original.OnSerializedTouched, Is.True); Assert.That(original.OnSerializingTouched, Is.True); }
public void JsonSerializer_Deserialize_hooks_on_base_class() { var original = new HookTestClass(); var json = JsonSerializer.SerializeToString <HookTestClass>(original); var deserialized = JsonSerializer.DeserializeFromString <HookTestClass>(json); Assert.That(deserialized.OnDeserializedTouched, Is.True); }