public void HashCodeIsTheSameAcrossInvocations() { Range r = new Range(0, 5); MethodInfo voidMethod = typeof(IDemo).GetMethod("VoidNoArgs"); IExpectation test = GetExpectation(voidMethod, r, 0); Assert.Equal(test.GetHashCode(), test.GetHashCode()); }
/// <summary> /// Gets the hash code. /// </summary> /// <returns></returns> public override int GetHashCode() { return(method.GetHashCode() + MockedObjectsEquality.Instance.GetHashCode(proxy) + expectation.GetHashCode()); }