コード例 #1
0
            public void ReturnsFalseForDifferentInstances()
            {
                var firstEntry  = ModelBaseTestHelper.CreateIniEntryObject("A", "B", "C");
                var secondEntry = ModelBaseTestHelper.CreateIniEntryObject("D", "E", "F");

                Assert.IsFalse(TagHelper.AreTagsEqual(firstEntry, secondEntry));
            }
コード例 #2
0
ファイル: BinarySerializerFacts.cs プロジェクト: yicong/Catel
            public void BinarySerializationLevel1()
            {
                var originalObject = ModelBaseTestHelper.CreateIniEntryObject();
                var clonedObject   = SerializationTestHelper.SerializeAndDeserialize(originalObject, SerializationFactory.GetBinarySerializer());

                Assert.AreEqual(originalObject, clonedObject);
            }
コード例 #3
0
            public void SerializationLevel1()
            {
                var originalObject = ModelBaseTestHelper.CreateIniEntryObject();

                TestSerializationOnAllSerializers((serializer, description) =>
                {
                    var clonedObject = SerializationTestHelper.SerializeAndDeserialize(originalObject, serializer);

                    Assert.AreEqual(originalObject, clonedObject, description);
                });
            }
コード例 #4
0
            public void ReturnsTrueForEqualInstances()
            {
                var firstEntry  = ModelBaseTestHelper.CreateIniEntryObject("A", "B", "C");
                var secondEntry = ModelBaseTestHelper.CreateIniEntryObject("A", "B", "C");

                // References equal
                Assert.IsTrue(TagHelper.AreTagsEqual(firstEntry, firstEntry));

                // Objects equal
                Assert.IsTrue(TagHelper.AreTagsEqual(firstEntry, secondEntry));
            }