public CsvReader(TextReader reader, CsvReaderConfiguration configuration) { this.reader = reader; this.configuration = configuration; }
private static void ReadAndVerify(string inputFileName, CsvReaderConfiguration configuration, object[][] expectedRows) { using (var csvReader = new CsvReader(new StreamReader(inputFileName), configuration)) { IReadOnlyList<object> row; while ((row = csvReader.Read()) != null) { Assert.IsTrue(csvReader.Row <= expectedRows.Length, TestResources.ExtraRowRead); CollectionAssert.AreEqual(expectedRows[csvReader.Row - 1], row.ToArray(), TestResources.InvalidRowRead); } } }