From: Choy R. <ch...@us...> - 2005-02-19 09:06:34
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26509/DotNetMock/Dynamic Modified Files: DynamicMock.cs DynamicOrderedMock.cs ExpectationMethod.cs Log Message: Now you assign the actual method call to the ActualMethodCall property of ExpectationMethod. So that it is like other expectations. sort of. Index: DynamicOrderedMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicOrderedMock.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DynamicOrderedMock.cs 17 Feb 2005 05:29:38 -0000 1.7 --- DynamicOrderedMock.cs 19 Feb 2005 09:06:26 -0000 1.8 *************** *** 62,66 **** ExpectationMethod e = (ExpectationMethod)expectations[0]; expectations.RemoveAt(0); ! e.SetActualMethodCall(mi, args); e.Verify(); return e.ReturnValue; --- 62,66 ---- ExpectationMethod e = (ExpectationMethod)expectations[0]; expectations.RemoveAt(0); ! e.ActualMethodCall = new MethodCall(mi, args); e.Verify(); return e.ReturnValue; Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DynamicMock.cs 17 Feb 2005 05:29:38 -0000 1.15 --- DynamicMock.cs 19 Feb 2005 09:06:26 -0000 1.16 *************** *** 205,209 **** ExpectationMethod e = (ExpectationMethod)list[0]; list.RemoveAt(0); ! e.SetActualMethodCall(mi, args); e.Verify(); return e.ReturnValue; --- 205,209 ---- ExpectationMethod e = (ExpectationMethod)list[0]; list.RemoveAt(0); ! e.ActualMethodCall = new MethodCall(mi, args); e.Verify(); return e.ReturnValue; Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ExpectationMethod.cs 19 Feb 2005 08:39:20 -0000 1.17 --- ExpectationMethod.cs 19 Feb 2005 09:06:26 -0000 1.18 *************** *** 92,96 **** /// <summary> /// True if actual method call was set. ! /// <seealso cref="SetActualMethodCall"/> /// </summary> public bool ActualMethodCallWasSet --- 92,96 ---- /// <summary> /// True if actual method call was set. ! /// <seealso cref="ActualMethodCall"/> /// </summary> public bool ActualMethodCallWasSet *************** *** 156,168 **** } } - /// <summary> - /// Set actual method call <see cref="MethodInfo"/> and arguments. - /// </summary> - /// <param name="actualMethod">actual method</param> - /// <param name="actualArguments">actual arguments</param> - public void SetActualMethodCall( MethodInfo actualMethod, params object[] actualArguments ) - { - ActualMethodCall = new MethodCall(actualMethod, actualArguments); - } //TODO: Refactor methods private string argsToString( object[] args ) --- 156,159 ---- |