public void GetHashCode_Int_ZeroCheck(int?testValue, bool expected) { var comparer = new DefaultComparer(); var hasCode = comparer.GetHashCode(testValue); var result = hasCode == 0; Assert.Equal(expected, result); }
public override int GetHashCode() { return(DefaultComparer.GetHashCode(this)); }
public void GetHashCode_Null_Throws() { var comparer = new DefaultComparer(); Assert.Throws <ArgumentNullException>(() => comparer.GetHashCode(null)); }