public bool Equals(MethodCallInfo other) { // Use StructuralComparisons for getting "value semantic" var arrayComparer = StructuralComparisons.StructuralEqualityComparer; return Equals(MethodName, other.MethodName) && arrayComparer.Equals(Arguments, other.Arguments); }
public bool Equals(MethodCallInfo other) { // Use StructuralComparisons for getting "value semantic" var arrayComparer = StructuralComparisons.StructuralEqualityComparer; return(Equals(MethodName, other.MethodName) && arrayComparer.Equals(Arguments, other.Arguments)); }
public void Test_Two_Objects_With_The_Same_Arguments_Returns_The_Same_HashCode() { // Arrange var callInfo1 = new MethodCallInfo("Foo", new object[] {1, "foo", 2.0}); var callInfo2 = new MethodCallInfo("Foo", new object[] {1, "foo", 2.0}); // Assert Assert.AreEqual(callInfo1.GetHashCode(), callInfo2.GetHashCode()); }
public void Test_Two_Objects_With_The_Same_Arguments_Are_Equal() { // Arrange var callInfo1 = new MethodCallInfo("Foo", new object[] {1, "foo", 2.0}); var callInfo2 = new MethodCallInfo("Foo", new object[] {1, "foo", 2.0}); // Assert Assert.AreEqual(callInfo1, callInfo2); }
public CustomTestCaseData(MethodCallInfo callInfo) : base(callInfo.MethodName, callInfo.Arguments) { }