From: <dar...@us...> - 2002-09-23 20:16:04
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory usw-pr-cvs1:/tmp/cvs-serv16841/DotNetMock Modified Files: ReturnValue.cs Log Message: Added HasValues property, primarily for use with void methods - in normal use, no return value will be set, unless an exception is desired to be thrown. Index: ReturnValue.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ReturnValue.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReturnValue.cs 18 Sep 2002 16:24:52 -0000 1.2 --- ReturnValue.cs 23 Sep 2002 20:16:00 -0000 1.3 *************** *** 8,11 **** --- 8,12 ---- { private bool repeatFinal; + private bool hasReturnValues; private Queue returnValues = new Queue(); private string name = "Unnamed ReturnValue"; *************** *** 30,35 **** --- 31,49 ---- } + public bool HasValues + { + set + { + this.hasReturnValues = value; + } + get + { + return this.hasReturnValues; + } + } + public void Add(object nextReturnValue) { + HasValues = true; this.returnValues.Enqueue(nextReturnValue); } |