Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
        public void Write(params string[] columns)
        {
            if (_writerStream == null)
            {
                throw new Exception("File not open");
            }

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

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