public void AnagramEqualityComparer_GetHashCode_SameForAnagrams(string word, string anagram) { var comparer = new AnagramEqualityComparer(); var hash1 = comparer.GetHashCode(word); var hash2 = comparer.GetHashCode(anagram); Assert.Equal(hash1, hash2); }
public static void GetHashCode_Some_WithCustomComparer() { // Arrange var cmp = new AnagramEqualityComparer(); // Act & Assert Assert.Equal(cmp.GetHashCode(MyText), ((IStructuralEquatable)SomeText).GetHashCode(cmp)); }
public override int GetHashCode() => s_Comparer.GetHashCode(Value);