public void TestMethodBinarySerialization() { SerializationDelegate serializer = BinarySerialize; InitializeObjectsAndReferencesDelegate initializeObjectsAndReferences = InitializeThreeObjectsAndReferences; EqualListsDelegate equalLists = EqualListsWithReferences; TestSerialization(serializer, initializeObjectsAndReferences, equalLists); }
public void TestMethodClientSerializationWithNullReferences() { SerializationDelegate serializer = ClientSerialize; InitializeObjectsAndReferencesDelegate initializeObjectsAndReferences = InitializeThreeObjectsWithoutReferences; EqualListsDelegate equalLists = EqualListsWithoutReferences; TestSerialization(serializer, initializeObjectsAndReferences, equalLists); }
public void TestSerialization(SerializationDelegate serializer, InitializeObjectsAndReferencesDelegate initializeObjectsAndReferences, EqualListsDelegate equalLists) { ApplicationDataContext applicationDataContext = new ApplicationDataContext() { Objects = new List <BaseObject>(), }; initializeObjectsAndReferences(applicationDataContext); List <BaseObject> listDesirializedObjects = serializer(applicationDataContext); equalLists(applicationDataContext.Objects, listDesirializedObjects); }