Пример #1
0
        public void TableLogs()
        {
            Table table = Table.Create(1, 1);
            table.AddRow("One", "Two");
            table.AddRow("Three", "Four");

            CsvLogger logger = new CsvLogger();
            logger.Write(table);
            Stream stream = logger.GetClipboardData().Data as Stream;
            stream.Position = 0;
            StreamReader reader = new StreamReader(stream);
            reader.ReadToEnd().Should().Be("\"One\",\"Two\"\r\n\"Three\",\"Four\"\r\n");
        }
Пример #2
0
 public void StandardWriteDoesNotLog()
 {
     CsvLogger logger = new CsvLogger();
     logger.Write("Foo");
     logger.GetClipboardData().Data.Should().BeNull();
 }