public void GetHashCode_returns_different_number_if_one_property_is_different() { var valueObjectTestSubject01 = new ValueObjectTestSubject( "baa", 1337, Guid.Empty ); var valueObjectTestSubject02 = new ValueObjectTestSubject( "foo", 1337, Guid.Empty ); Assert.NotEqual( valueObjectTestSubject01.GetHashCode(), valueObjectTestSubject02.GetHashCode() ); }
public void GetHashCode_returns_same_number_if_both_has_same_properties() { var valueObjectTestSubject01 = new ValueObjectTestSubject( "foo", 1337, Guid.Empty ); var valueObjectTestSubject02 = new ValueObjectTestSubject( "foo", 1337, Guid.Empty ); Assert.Equal( valueObjectTestSubject01.GetHashCode(), valueObjectTestSubject02.GetHashCode() ); }