コード例 #1
0
        public void ExportToFilesTest()
        {
            string file = null;

            try
            {
                var summary      = TestBenchmarkRunner.GetSummary();
                var xlsxReporter = new XlsxExporter();
                var dateTime     = DateTime.Now;
                var files        = xlsxReporter.ExportToFiles(summary, NullLogger.Instance);
                Assert.True(files.Any());
                file = files.First();
                Assert.True(File.Exists(file));
                Assert.True(File.GetLastWriteTime(file) > dateTime);
            }
            finally
            {
                if (!(file is null))
                {
                    File.Delete(file);
                }
            }
        }
コード例 #2
0
        public void ExportToFilesThrowsWhenLoggerParameterIsNull()
        {
            var exporter = new XlsxExporter();

            Assert.NotNull(Record.Exception(() => exporter.ExportToFiles(TestBenchmarkRunner.EmptySummary, null)));
        }
コード例 #3
0
        public void ExportToFilesThrowsWhenSummaryParameterIsNull()
        {
            var exporter = new XlsxExporter();

            Assert.NotNull(Record.Exception(() => exporter.ExportToFiles(null, NullLogger.Instance)));
        }