public void Write(params string[] columns) { if (_csvWriter == null) { throw new NullReferenceException("The file writer is closed. Please reopen it."); } _csvWriter.Write(columns); }
public void Write(params string[] columns) { if (_writerStream == null) { throw new Exception("File not open"); } csvWriter.Write(columns); }
public void ShouldWriteToTextWriter() { var textWriter = new Mock <TextWriter>(); _csvWriter.SetWriter(textWriter.Object); _csvWriter.Open(Filename); _csvWriter.Write(new String[] { "newColumn1", "newColumn2" }); textWriter.Verify(x => x.WriteLine("newColumn1\tnewColumn2")); _csvWriter.Close(); }
public void Write(params string[] columns) { IsWriterInitialized(); _writer.Write(columns); }
//Keep the write method for backward compatibility public void Write(params string[] columns) { _csvWriter.Write(columns); }