public void CSVFileReader_SuccessfulMultipleReads_LessData() { string filePath = GetTempFilePath(); WriteData(filePath, "data1"); FileDataReader reader = new FileDataReader(); reader.Open(filePath); Assert.DoesNotThrow(() => reader.ReadLine()); Assert.DoesNotThrow(() => reader.ReadLine()); reader.Close(); }
public void CSVFileReader_SuccessfulRead() { string filePath = GetTempFilePath(); WriteData(filePath, "somedata"); FileDataReader reader = new FileDataReader(); reader.Open(filePath); string dataRead = null; Assert.DoesNotThrow(() => dataRead = reader.ReadLine()); Assert.AreEqual("somedata", dataRead); reader.Close(); }
public void CSVFileReader_ReadWithoutInitialization() { FileDataReader reader = new FileDataReader(); Assert.Throws <InvalidOperationException>(() => reader.ReadLine()); }