Example #1
0
        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();
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }
Example #4
0
        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();
        }