public void TestNull() { var test = new DirectCycleTestObject { Child = null }; var testString = serializer.SerializeToString(test); var newTestObject = serializer.Deserialize <DirectCycleTestObject>(testString); Assert.AreEqual(null, newTestObject.Child); }
public void TestSelfCycle() { var test = new DirectCycleTestObject { Value = 3 }; test.Child = test; var testString = serializer.SerializeToString(test); var newTestObject = serializer.Deserialize <DirectCycleTestObject>(testString); Assert.AreEqual(newTestObject, newTestObject.Child); }