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."); }