public void DataSetSource_get_row_works() { DataSet ds = GetDataSet(); DataSetSource dss = new DataSetSource(ds); int table = dss.GetTables().First(); object[] row0 = dss.GetRow(table, 0); object[] row1 = dss.GetRow(table, 1); object[] row2 = dss.GetRow(table, 2); Assert.IsNotNull(row0); Assert.IsNotNull(row1); Assert.IsNull(row2); Assert.AreEqual(2, row0.Length); Assert.AreEqual(2, row1.Length); Assert.IsInstanceOfType(row0[0], typeof(int)); Assert.IsInstanceOfType(row0[1], typeof(string)); Assert.IsInstanceOfType(row1[0], typeof(int)); Assert.AreEqual(0, row0[0]); Assert.AreEqual(1, row1[0]); Assert.AreEqual("testrow0", row0[1]); Assert.AreEqual(null, row1[1]); }
public object[] GetRow(int tableIndex, int rowIndex) { return(_source.GetRow(tableIndex, rowIndex)); }