public void compare_entity_with_different_entity_proxy_with_different_id() { var testEntityOne = new TestEntityOne(); testEntityOne.SetId(23); var testEntityTwoProxy = new ProxyGenerator().CreateClassProxy <TestEntityTwo>(); testEntityTwoProxy.SetId(24); Equals(testEntityOne, testEntityTwoProxy).ShouldBeFalse(); Equals(testEntityTwoProxy, testEntityOne).ShouldBeFalse(); }
public void compare_entity_with_its_derived_entity_with_different_id() { var testEntityOne = new TestEntityOne(); testEntityOne.SetId(23); var derivedTestEntityOne = new DerivedTestEntityOne(); derivedTestEntityOne.SetId(24); Equals(testEntityOne, derivedTestEntityOne).ShouldBeFalse(); Equals(derivedTestEntityOne, testEntityOne).ShouldBeFalse(); }
public void compare_entity_with_its_entity_proxy_with_the_same_id() { var testEntityOne = new TestEntityOne(); testEntityOne.SetId(23); var testEntityOneProxy = new ProxyGenerator().CreateClassProxy <TestEntityOne>(); testEntityOneProxy.SetId(23); Equals(testEntityOne, testEntityOneProxy).ShouldBeTrue(); Equals(testEntityOneProxy, testEntityOne).ShouldBeTrue(); }
public void compare_entity_with_its_derived_entity_with_the_same_id() { var testEntityOne = new TestEntityOne(); testEntityOne.SetId(23); var derivedTestEntityOne = new DerivedTestEntityOne(); derivedTestEntityOne.SetId(23); Equals(testEntityOne, derivedTestEntityOne).ShouldBeTrue(); Equals(derivedTestEntityOne, testEntityOne).ShouldBeTrue(); }