private void AddExpectedCall(string methodName, object returnVal, Exception exception, object[] args) { IMethod method = (IMethod)methods[methodName]; if (method == null) { method = new MockMethod(methodName); methods[methodName] = method; } Type[] argTypes = MethodSignature.GetArgTypes(args); MethodSignature signature = new MethodSignature(this.Name, methodName, argTypes); method.Expect(new MockCall(signature, returnVal, exception, args)); }
public void SetReturnValue( string methodName, object returnVal ) { methods[methodName] = new MockMethod( methodName, returnVal ); }
public void ExpectNoCall( string methodName ) { methods[methodName] = new MockMethod( methodName, null, new AssertionException("Unexpected call to method " + methodName) ); }
private void AddExpectedCall( string methodName, object returnVal, Exception exception, object[] args ) { IMethod method = (IMethod)methods[methodName]; if ( method == null ) { method = new MockMethod( methodName ); methods[methodName] = method; } Type[] argTypes = MethodSignature.GetArgTypes( args ); MethodSignature signature = new MethodSignature( this.Name, methodName, argTypes ); method.Expect( new MockCall( signature, returnVal, exception, args ) ); }
public void ExpectNoCall(string methodName) { methods[methodName] = new MockMethod(methodName, null, new AssertionException("Unexpected call to method " + methodName)); }
public void SetReturnValue(string methodName, object returnVal) { methods[methodName] = new MockMethod(methodName, returnVal); }