public void EqualsWithOneTransientObjectReturnsFalse() { var obj1 = new SimpleDomainObject(); var obj2 = new SimpleDomainObject(); obj2.SetId(1); var equality = Equals(obj1, obj2); Assert.AreEqual(false, equality); }
public void EqualsWithDifferentIdsInDisparateClassesReturnsFalse() { var obj1 = new SimpleDomainObject(); var obj2 = new OtherDomainObject(); obj1.SetId(1); obj2.SetId(2); bool equality = Equals(obj1, obj2); Assert.AreEqual(false, equality); }
public void EqualsWithDifferentIdsReturnsFalse() { var obj1 = new SimpleDomainObject(); var obj2 = new SimpleDomainObject(); obj1.SetId(1); obj2.SetId(2); var equality = Equals(obj1, obj2); Assert.AreEqual(false, equality); }
public void EqualsWithSameIdsReturnsTrue() { var obj1 = new SimpleDomainObject(); var obj2 = new SimpleDomainObject(); obj1.SetId(1); obj2.SetId(1); var equality = Equals(obj1, obj2); Assert.AreEqual(true, equality); }