Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Data
In directory sc8-pr-cvs1:/tmp/cvs-serv13414/DotNetMock/Data
Modified Files:
MockDataReader.cs
Log Message:
Added MailingList Example
Index: MockDataReader.cs
===================================================================
RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Data/MockDataReader.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MockDataReader.cs 28 Dec 2002 21:36:34 -0000 1.1
--- MockDataReader.cs 29 Dec 2002 02:47:39 -0000 1.2
***************
*** 19,22 ****
--- 19,23 ----
private object[,] _rows = new object[0,0];
private int _currentRow = -1;
+ private Exception _getException = null;
public MockDataReader() {}
***************
*** 47,50 ****
--- 48,55 ----
_rows = rows;
}
+ public void SetGetException(Exception exception)
+ {
+ _getException = exception;
+ }
#endregion
#region Implementation of IDataReader
***************
*** 115,118 ****
--- 120,127 ----
public object GetValue(int i)
{
+ if (_getException != null)
+ {
+ throw _getException;
+ }
return _rows[_currentRow, i - 1];
}
|