Пример #1
0
        public void Equals_ToEntityWithDifferentType_ReturnsFalse(DomainEntity a, DomainEntity b)
        {
            // Act
            var result = a.Equals(b);

            // Assert
            result.Should().BeFalse("because argument is non-null instance of a different type than the type of the current object.");
        }
Пример #2
0
        public void Equals_ToEntityWithSameIdentityComponents_ReturnsTrue(DomainEntity a, DomainEntity b)
        {
            // Act
            var result = a.Equals(b);

            // Assert
            result.Should().BeTrue("because argument is non-null instance of the same type and semantically equal to current object.");
        }
Пример #3
0
        public void Equals_ToEntityWithDifferentIdentityComponents_ReturnsFalse(DomainEntity a, DomainEntity b)
        {
            // Act
            var result = a.Equals(b);

            // Assert
            result.Should().BeFalse("because argument is non-null instance of the same type but semantically different from current object.");
        }
Пример #4
0
        public void Equals_ToEntityWithNullReference_ReturnsFalse()
        {
            // Arrange
            DomainEntity a = NewEntity();
            DomainEntity b = null;
            // Act
            var result = a.Equals(b);

            // Assert
            result.Should().BeFalse("because argument is null.");
        }