Exemple #1
0
 public void Write(params string[] columns)
 {
     if (_csvWriter == null)
     {
         throw new NullReferenceException("The file writer is closed. Please reopen it.");
     }
     _csvWriter.Write(columns);
 }
Exemple #2
0
        public void Write(params string[] columns)
        {
            if (_writerStream == null)
            {
                throw new Exception("File not open");
            }

            csvWriter.Write(columns);
        }
Exemple #3
0
        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();
        }
Exemple #4
0
        public void Write(params string[] columns)
        {
            IsWriterInitialized();

            _writer.Write(columns);
        }
Exemple #5
0
 //Keep the write method for backward compatibility
 public void Write(params string[] columns)
 {
     _csvWriter.Write(columns);
 }