public IDataReader GetData(int i) { StubDataReader reader = new StubDataReader(this.stubResultSets); reader.currentResultsetIndex = i; return(reader); }
/// <summary> /// Initializes a new instance of the <see cref="StubDataReader"/> class. /// Each DataTable is a ResultSet /// </summary> /// <param name="tables">The tables to use as Results</param> public StubDbDataReader(params DataTable[] tables) { StubResultSetCollection col = new StubResultSetCollection(); foreach (DataTable item in tables) { _hasRows.Add((item.Rows.Count > 0)); col.Add(new StubResultSet(item)); } _stubReader = new StubDataReader(col); }
public void IsDBNull_Null_Test() { StubResultSetCollection stubResultSets = new StubResultSetCollection(); stubResultSets.Add(CreateIsDBNullResultSet()); StubDataReader target = new StubDataReader(stubResultSets); target.Read(); int i = 0; bool expected = true; bool actual; actual = target.IsDBNull(i); Assert.AreEqual(expected, actual); }
/// <summary> /// Initializes a new instance of the <see cref="StubDataReader"/> class. /// Each row in the arraylist is a result set. /// </summary> /// <param name="stubResultSets">The result sets.</param> public StubDbDataReader(StubResultSetCollection stubResultSets) { _stubReader = new StubDataReader(stubResultSets); }
/// <summary> /// Initializes a new instance of the <see cref="StubDataReader"/> class. /// Each row in the arraylist is a result set. /// </summary> /// <param name="resultSets">The result sets to add.</param> public StubDbDataReader(params StubResultSet[] resultSets) { _stubReader = new StubDataReader(resultSets); }
public IDataReader GetData(int i) { StubDataReader reader = new StubDataReader(this.stubResultSets); reader.currentResultsetIndex = i; return reader; }