Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22271/DotNetMock/Dynamic
Modified Files:
ExpectationMethod.cs
Log Message:
Refactor: rename couple members to clarify the separation between expected values and actual values.
Index: ExpectationMethod.cs
===================================================================
RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** ExpectationMethod.cs 17 Feb 2005 05:29:38 -0000 1.14
--- ExpectationMethod.cs 18 Feb 2005 00:41:52 -0000 1.15
***************
*** 27,35 ****
/// Arguments to the method that was called
/// </summary>
! private object[] _methodArguments;
/// <summary>
! /// Possible return value for this method call
/// </summary>
! private object _returnValue;
/// <summary>
/// Exception to throw when the method is called
--- 27,35 ----
/// Arguments to the method that was called
/// </summary>
! private object[] _actualMethodArguments;
/// <summary>
! /// Expected return value for this method call if any.
/// </summary>
! private object _expectedReturnValue;
/// <summary>
/// Exception to throw when the method is called
***************
*** 77,81 ****
}
! _returnValue = returnValue;
_expectedException = expectedException;
}
--- 77,81 ----
}
! _expectedReturnValue = returnValue;
_expectedException = expectedException;
}
***************
*** 92,96 ****
public object ReturnValue
{
! get { return _returnValue; }
}
/// <summary>
--- 92,96 ----
public object ReturnValue
{
! get { return _expectedReturnValue; }
}
/// <summary>
***************
*** 141,145 ****
{
_actualMethod = actualMethod;
! _methodArguments = actualArguments;
}
//TODO: Refactor methods
--- 141,145 ----
{
_actualMethod = actualMethod;
! _actualMethodArguments = actualArguments;
}
//TODO: Refactor methods
***************
*** 187,191 ****
"{0}({1}) expected, but {2}({3}) called.",
ExpectedMethodName, argsToString(_expectedMethodArguments),
! ActualMethodName, argsToString(_methodArguments)
));
}
--- 187,191 ----
"{0}({1}) expected, but {2}({3}) called.",
ExpectedMethodName, argsToString(_expectedMethodArguments),
! ActualMethodName, argsToString(_actualMethodArguments)
));
}
***************
*** 195,199 ****
{
object argumentExpectation = _expectedMethodArguments[i];
! object actualArg = _methodArguments[i];
// evaluate whether input expectations have been met
--- 195,199 ----
{
object argumentExpectation = _expectedMethodArguments[i];
! object actualArg = _actualMethodArguments[i];
// evaluate whether input expectations have been met
***************
*** 206,210 ****
i,
ExpectedMethodName,
! argsToString(_methodArguments)
);
Assertion.Assert(failureMessage, predicate.Eval(actualArg));
--- 206,210 ----
i,
ExpectedMethodName,
! argsToString(_actualMethodArguments)
);
Assertion.Assert(failureMessage, predicate.Eval(actualArg));
***************
*** 214,218 ****
if ( mutator!=null )
{
! mutator.Mutate(ref _methodArguments[i]);
}
}
--- 214,218 ----
if ( mutator!=null )
{
! mutator.Mutate(ref _actualMethodArguments[i]);
}
}
|