Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public void GetHashCode_Different_For_Mismatches(Suggestion[] data)
        {
            ArrayComparer <Suggestion, SuggestionComparer> comparer = new ArrayComparer <Suggestion, SuggestionComparer>();

            Assert.NotEqual(comparer.GetHashCode(baseline), comparer.GetHashCode(data));
        }
Esempio n. 3
0
        private int ComputeHashCode()
        {
            ArrayComparer <byte> comparer = ArrayComparer <byte> .Comparer;

            return(comparer.GetHashCode(this.binaryData));
        }