public void ReturnsFalseForDifferentInstances() { var firstEntry = ModelBaseTestHelper.CreateIniEntryObject("A", "B", "C"); var secondEntry = ModelBaseTestHelper.CreateIniEntryObject("D", "E", "F"); Assert.IsFalse(TagHelper.AreTagsEqual(firstEntry, secondEntry)); }
public void BinarySerializationLevel1() { var originalObject = ModelBaseTestHelper.CreateIniEntryObject(); var clonedObject = SerializationTestHelper.SerializeAndDeserialize(originalObject, SerializationFactory.GetBinarySerializer()); Assert.AreEqual(originalObject, clonedObject); }
public void SerializationLevel1() { var originalObject = ModelBaseTestHelper.CreateIniEntryObject(); TestSerializationOnAllSerializers((serializer, description) => { var clonedObject = SerializationTestHelper.SerializeAndDeserialize(originalObject, serializer); Assert.AreEqual(originalObject, clonedObject, description); }); }
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)); }