public void Transient_Object_Should_Return_Consistent_HashCode_When_Made_Persistant()
 {
     var obj = new ObjectWithOneDomainSignature();
     int firstHash = obj.GetHashCode();
     obj.SetProperty(m => m.Id, 1);
     int secondHash = obj.GetHashCode();
     Assert.AreEqual(firstHash, secondHash);
 }
 public void Should_Return_True_If_Different_Instances_With_Same_Id()
 {
     var obj = new ObjectWithOneDomainSignature();
     obj.SetProperty(m => m.Id, 2);
     var obj2 = new ObjectWithOneDomainSignature();
     obj2.SetProperty(m => m.Id, 2);
     Assert.AreEqual(obj, obj2);
 }
        public void Two_Persistant_Objects_With_Same_Ids_Generate_Same_HashCode()
        {
            var obj1 = new ObjectWithOneDomainSignature();
            obj1.SetProperty(m => m.Id, 1);

            var obj2 = new ObjectWithOneDomainSignature();
            obj2.SetProperty(m => m.Id, 1);
            Assert.AreEqual(obj1.GetHashCode(), obj2.GetHashCode());
        }