public void CorrectlyHandlesSameInstancesInGraph() { var graph = SerializationTestHelper.CreateComplexCircularTestModelGraph(); var clonedGraph = SerializationTestHelper.SerializeAndDeserialize(graph, SerializationFactory.GetBinarySerializer()); Assert.IsNotNull(clonedGraph); Assert.IsTrue(ReferenceEquals(clonedGraph, clonedGraph.CircularModel.CircularModel)); }
public void CorrectlyHandlesSameInstancesInGraph() { var graph = SerializationTestHelper.CreateComplexCircularTestModelGraph(); TestSerializationOnAllSerializers((serializer, description) => { var clonedGraph = SerializationTestHelper.SerializeAndDeserialize(graph, serializer); Assert.IsNotNull(clonedGraph, description); Assert.IsTrue(ReferenceEquals(clonedGraph, clonedGraph.CircularModel.CircularModel), description); }, false); }