Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3899/DotNetMock/Dynamic
Modified Files:
DynamicOrderedMock.cs
Log Message:
Replace argsToString with MethodCall stringification.
Index: DynamicOrderedMock.cs
===================================================================
RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicOrderedMock.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** DynamicOrderedMock.cs 19 Feb 2005 21:34:39 -0000 1.9
--- DynamicOrderedMock.cs 19 Feb 2005 21:47:56 -0000 1.10
***************
*** 59,63 ****
if (expectations.Count == 0)
{
! Assertion.Fail( "Unexpected call to method " + methodName + "(" + argsToString(args) + ")");
}
ExpectationMethod e = (ExpectationMethod)expectations[0];
--- 59,66 ----
if (expectations.Count == 0)
{
! Assertion.Fail(String.Format(
! "Unexpected call {0}",
! methodCall
! ));
}
ExpectationMethod e = (ExpectationMethod)expectations[0];
***************
*** 67,82 ****
return e.ReturnValue;
}
- private string argsToString( object[] args ) {
- if ( args.Length > 0 )
- {
- string argStr = "";
- foreach( object o in args )
- {
- argStr = argStr + ", \"" + o.ToString() + "\"";
- }
- return argStr.Substring(2);
- }
- return String.Empty;
- }
/// <summary>
/// Adds a <see cref="ExpectationMethod"/> to the list of expectations of the mock object.
--- 70,73 ----
|