public void EquivalentTypeComparerTest4() { EquivalentTypeComparer equivalentTypeComparer = new EquivalentTypeComparer(); Assert.AreNotEqual( equivalentTypeComparer.GetHashCode(typeof(string)), equivalentTypeComparer.GetHashCode(typeof(object))); }
public void EquivalentTypeComparerTest2() { EquivalentTypeComparer equivalentTypeComparer = new EquivalentTypeComparer(); Assert.AreEqual( equivalentTypeComparer.GetHashCode(methodInfoParameter.ReturnType), equivalentTypeComparer.GetHashCode(methodInfoParameter.GetParameterTypes().First())); }
private static void CheckGetHashCode(Type x, Type y, bool shouldBeEqualHashCodes) { var comparer = new EquivalentTypeComparer(); var firstHashCode = comparer.GetHashCode(x); var secondHashCode = comparer.GetHashCode(y); if (shouldBeEqualHashCodes) { firstHashCode.Should().Be(secondHashCode); } }