public void NotEqualToOperator_OperandsWithSameIdentityComponents_ReturnsFalse(DomainEntity a, DomainEntity b) { // Act var result = a != b; // Assert result.Should().BeFalse("because operands are non-null instance of the same type and semantically equal."); }
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."); }
public void NotEqualToOperator_OperandsWithDifferentTypes_ReturnsTrue(DomainEntity a, DomainEntity b) { // Act var result = a != b; // Assert result.Should().BeTrue("because operands are non-null instances of a different type."); }
public void NotEqualToOperator_OperandsWithDifferentIdentityComponents_ReturnsTrue(DomainEntity a, DomainEntity b) { // Act var result = a != b; // Assert result.Should().BeTrue("because operands are non-null instances of the same type but semantically different."); }
public void GetHashCode_EntitiesWithSameIdentityComponents_ReturnsSameValue(DomainEntity a, DomainEntity b) { // Act var hashCodeOfA = a.GetHashCode(); var hashCodeOfB = b.GetHashCode(); // Assert hashCodeOfA.Should().Be(hashCodeOfB, "because objects are semantically equal."); }
public void GetHashCode_EntitiesWithDifferentIdentityComponents_ReturnsDifferentValues(DomainEntity a, DomainEntity b) { // Act var hashCodeOfA = a.GetHashCode(); var hashCodeOfB = b.GetHashCode(); // Assert hashCodeOfA.Should().NotBe(hashCodeOfB, "because objects are semantically different."); }
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."); }