コード例 #1
0
ファイル: UnitTestReferences.cs プロジェクト: Vakenrovec/CRUD
        public void TestMethodBinarySerialization()
        {
            SerializationDelegate serializer = BinarySerialize;
            InitializeObjectsAndReferencesDelegate initializeObjectsAndReferences = InitializeThreeObjectsAndReferences;
            EqualListsDelegate equalLists = EqualListsWithReferences;

            TestSerialization(serializer, initializeObjectsAndReferences, equalLists);
        }
コード例 #2
0
ファイル: UnitTestReferences.cs プロジェクト: Vakenrovec/CRUD
        public void TestMethodClientSerializationWithNullReferences()
        {
            SerializationDelegate serializer = ClientSerialize;
            InitializeObjectsAndReferencesDelegate initializeObjectsAndReferences = InitializeThreeObjectsWithoutReferences;
            EqualListsDelegate equalLists = EqualListsWithoutReferences;

            TestSerialization(serializer, initializeObjectsAndReferences, equalLists);
        }
コード例 #3
0
ファイル: UnitTestReferences.cs プロジェクト: Vakenrovec/CRUD
        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);
        }