public void Appends_range_info_to_table_name() { var companies = from c in _factory.WorksheetRange("B2", "D4") select c; try { companies.GetEnumerator(); } catch (OleDbException) { } Assert.AreEqual("SELECT * FROM [Sheet1$B2:D4]", GetSQLStatement()); }
public void WorksheetRange_can_query_sheet_times_on_same_connection(int times) { int totalRows = 0; for (int i = 0; i < times; i++) { List <ExcelRow> rows = (from cm in _factory.WorksheetRange("A1", "D8") select cm).ToList(); totalRows += rows.Count; } Assert.AreEqual((times * 7), totalRows); }
public void WorksheetRangeNoHeader_can_query_sheet_500_times_on_same_connection() { IQueryable <Row> rows = null; int totalRows = 0; for (int i = 0; i < 500; i++) { rows = from cm in _factory.WorksheetRange("A2", "D8") select cm; totalRows += rows.Count(); } Assert.AreEqual((500 * 7), totalRows); }