public void GetHashCode_Same_For_Matches() { // NOTE: Equals_True_For_Identical() verifies that baseline and matching return equal. // The spec says GetHashCode() should therefore return the same value. ArrayComparer <Suggestion, SuggestionComparer> comparer = new ArrayComparer <Suggestion, SuggestionComparer>(); Assert.Equal(comparer.GetHashCode(baseline), comparer.GetHashCode(matching)); }
public void GetHashCode_Different_For_Mismatches(Suggestion[] data) { ArrayComparer <Suggestion, SuggestionComparer> comparer = new ArrayComparer <Suggestion, SuggestionComparer>(); Assert.NotEqual(comparer.GetHashCode(baseline), comparer.GetHashCode(data)); }
private int ComputeHashCode() { ArrayComparer <byte> comparer = ArrayComparer <byte> .Comparer; return(comparer.GetHashCode(this.binaryData)); }