From: Choy R. <ch...@us...> - 2005-02-20 09:26:58
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15950/DotNetMock/Dynamic Modified Files: AbstractArgumentMutator.cs IPredicate.cs Log Message: Make sure all Predicates support the ability to describe their evaluation expression through the ExpressionAsText(name) method. The name parameter is so that in the future we can include the name of the parameter that didn't satisfy the predicate in our assertion failure messages. Index: IPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/IPredicate.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** IPredicate.cs 1 Jan 2005 22:58:07 -0000 1.6 --- IPredicate.cs 20 Feb 2005 09:26:49 -0000 1.7 *************** *** 13,16 **** --- 13,25 ---- /// <returns>True/False if the current value equals the input value </returns> bool Eval(object inputValue); + /// <summary> + /// Text representation of what is evaluated by the + /// <see cref="Eval"/> method. + /// </summary> + /// <param name="name"> + /// name of value/variable to use in the expression text + /// </param> + /// <returns>text representation of this predicate</returns> + string ExpressionAsText(string name); } } Index: AbstractArgumentMutator.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/AbstractArgumentMutator.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractArgumentMutator.cs 5 Jan 2005 00:29:34 -0000 1.3 --- AbstractArgumentMutator.cs 20 Feb 2005 09:26:49 -0000 1.4 *************** *** 35,47 **** } /// <summary> ! /// Evaluates the input value according to the contained predicate. /// </summary> - /// <param name="inputValue">Value to evaluate</param> - /// <returns>Result of the predicate evaluation</returns> public virtual bool Eval(object inputValue) { return _predicate.Eval(inputValue); } ! } } --- 35,51 ---- } /// <summary> ! /// <seealso cref="IPredicate.Eval"/> /// </summary> public virtual bool Eval(object inputValue) { return _predicate.Eval(inputValue); } ! /// <summary> ! /// <seealso cref="IPredicate.ExpressionAsText"/> ! /// </summary> ! public virtual string ExpressionAsText(string name) ! { ! return _predicate.ExpressionAsText(name); ! } } } |