public void TestGetDataFromReader() { var columns = new List <Column> { new Column { ColumnName = "AlbumId" }, new Column { ColumnName = "Title" }, new Column { ColumnName = "ArtistId" }, }; IDataReader reader = null; using (IRepository repo = new SQLiteRepository(chinookConnectionString)) { reader = repo.GetDataFromReader("Album", columns); while (reader.Read()) { Assert.IsTrue(reader.GetValue(0).GetType() == typeof(long)); Assert.IsTrue(reader.GetValue(2).GetType() == typeof(long)); } } }
public void TestGetDataFromReader() { var columns = new List<Column> { new Column { ColumnName = "AlbumId"}, new Column { ColumnName = "Title"}, new Column { ColumnName = "ArtistId"}, }; IDataReader reader = null; using (IRepository repo = new SQLiteRepository(chinookConnectionString)) { reader = repo.GetDataFromReader("Album", columns); while (reader.Read()) { Assert.IsTrue(reader.GetValue(0).GetType() == typeof(long)); Assert.IsTrue(reader.GetValue(2).GetType() == typeof(long)); } } }