///<inheritdoc/> public override int GetHashCode() { int hash = 17; // Overflow is fine, just wrap unchecked { hash = (hash * 29) + Breach.GetHashCode(); hash = (hash * 29) + MineCount.GetHashCode(); } return(hash); }
public void GetHashCode_ReturnsSameHashCodesForSameValues() { var p = new Breach() { Name = "VALUE", }; var other = new Breach() { Name = "VALUE", }; Assert.Equal(p.GetHashCode(), other.GetHashCode()); }
public void GetHashCode_ReturnsDifferentHashCodesForDifferentValues() { var p = new Breach() { Name = "FIRST", }; var other = new Breach() { Name = "SECOND", }; Assert.NotEqual(p.GetHashCode(), other.GetHashCode()); }