public void DeserializeIndirectSelfReferringObjectWhenThrowUponSerializingCyclingReferencesIsNotSet() { var inst = IndirectSelfReferringObject.GetSampleInstanceWithLoop(); var ser = new YAXSerializer(typeof(IndirectSelfReferringObject), YAXExceptionHandlingPolicies.DoNotThrow, YAXExceptionTypes.Error); string input = ser.Serialize(inst); var deserializedInstance = (IndirectSelfReferringObject)ser.Deserialize(input); Assert.That(deserializedInstance, Is.Not.Null); Assert.IsNull(deserializedInstance.Child.Parent); }
public void IndirectSelfReferringTypeIsNotNecessarilyASelfReferringObject() { object obj = IndirectSelfReferringObject.GetSampleInstance(); PerformTest(obj); }