public void PureObjectBase_Comparison() { var objectBase1 = new PureObjectTest(TestLoggerFactory); var objectBase2 = new PureObjectTest(TestLoggerFactory); Assert.False(objectBase1.Equals(objectBase2), "objectBase1.Equals(objectBase2)"); Assert.False(objectBase1.IsSameObjectId(objectBase2), "objectBase1.IsSameObjectId(objectBase2)"); Assert.True(objectBase1.IsSameObjectVersion(objectBase2), "objectBase1.IsSameObjectVersion(objectBase2)"); }
public void PureObjectBase_Clone() { var objectBase1 = new PureObjectTest(TestLoggerFactory); var objectBase2 = objectBase1.CloneInstance(); // Objects version is the same but everyone else Assert.False(objectBase1.Equals(objectBase2), "objectBase1.Equals(objectBase2)"); Assert.False(objectBase1.IsSameObjectId(objectBase2), "objectBase1.IsSameObjectId(objectBase2)"); Assert.True(objectBase1.IsSameObjectVersion(objectBase2), "objectBase1.IsSameObjectVersion(objectBase2)"); }
public void PureObjectBase_Equals_CloneInstance() { var objectBase1 = new PureObjectTest(TestLoggerFactory); var objectBase2 = objectBase1.CloneInstance(); // ObjectId's are same but Creation and Modification dates are different Assert.False(objectBase1.Equals(objectBase2), "objectBase1.Equals(objectBase2)"); Assert.False(objectBase1.IsSameObjectId(objectBase2), "objectBase1.IsSameObjectId(objectBase2)"); Assert.True(objectBase1.IsSameObjectVersion(objectBase2), "objectBase1.IsSameObjectVersion(objectBase2)"); }