public void TestGetSchemaTableNotRead() { using (var stream = new MemoryStream()) using (var writer = new StreamWriter(stream)) using (var reader = new StreamReader(stream)) using (var dtReader = new DelimitedTextReader(reader)) { writer.Write(headerLine); writer.Write(dataLine1); writer.Flush(); stream.Position = 0; using (var dataReader = new DelimitedTextDataReader(dtReader)) { DataTable dt = dataReader.GetSchemaTable(); Assert.NotNull(dt); Assert.Equal(15, dt.Rows.Count); Assert.Equal("StringField", dt.Rows[11][0].ToString()); } } }