public void Subclassed_entities_should_not_equal_entities_of_a_different_type_even_if_the_Id_is_the_same()
        {
            var first = new TestSubEntity { Id = 99 };
            var second = new AnotherSubEntity { Id = 99 };

            first.Equals(second).ShouldBeFalse();
        }
        public void Subclassed_entities_should_equal_each_other_with_same_Id()
        {
            var first = new TestSubEntity {Id = 99};
            var second = new TestSubEntity { Id = 99 };

            first.Equals(second).ShouldBeTrue();
        }
        public void Deep_subclassed_entities_should_not_equal_their_parent_classed_entities_even_if_the_Id_is_the_same()
        {
            var first = new TestSubEntity { Id = 99 };
            var second = new DeepSubEntity { Id = 99 };

            first.Equals(second).ShouldBeFalse();
        }
Пример #4
0
        public void Deep_subclassed_entities_should_not_equal_their_parent_classed_entities_even_if_the_Id_is_the_same()
        {
            var first = new TestSubEntity {
                Id = 99
            };
            var second = new DeepSubEntity {
                Id = 99
            };

            first.Equals(second).ShouldBeFalse();
        }
Пример #5
0
        public void Subclassed_entities_should_not_equal_entities_of_a_different_type_even_if_the_Id_is_the_same()
        {
            var first = new TestSubEntity {
                Id = 99
            };
            var second = new AnotherSubEntity {
                Id = 99
            };

            first.Equals(second).ShouldBeFalse();
        }
Пример #6
0
        public void Subclassed_entities_should_equal_each_other_with_same_Id()
        {
            var first = new TestSubEntity {
                Id = 99
            };
            var second = new TestSubEntity {
                Id = 99
            };

            first.Equals(second).ShouldBeTrue();
        }