예제 #1
0
        public void ItShouldConsiderSameInstanceEqual()
        {
            var entity1 = new StringEntity();
            var entity2 = entity1;

            entity1.Should().Be(entity2);
        }
예제 #2
0
        public void ItShouldConsiderSameDefaultIdentityNotEqual()
        {
            var entity1 = new StringEntity {
                Id = null
            };
            var entity2 = new StringEntity {
                Id = null
            };

            entity1.Should().NotBe(entity2);
        }
예제 #3
0
        public void ItShouldNotConsiderDifferentIdentityEqual()
        {
            var entity1 = new StringEntity {
                Id = "12345"
            };
            var entity2 = new StringEntity {
                Id = "qwert"
            };

            entity1.Should().NotBe(entity2);
        }
예제 #4
0
        public void ItShouldConsiderSameNonDefaultIdentityEqual()
        {
            var identity = "1234qwerasdf";
            var entity1  = new StringEntity {
                Id = identity
            };
            var entity2 = new StringEntity {
                Id = identity
            };

            entity1.Should().Be(entity2);
        }