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); } } }
public void ExportToFilesThrowsWhenLoggerParameterIsNull() { var exporter = new XlsxExporter(); Assert.NotNull(Record.Exception(() => exporter.ExportToFiles(TestBenchmarkRunner.EmptySummary, null))); }
public void ExportToFilesThrowsWhenSummaryParameterIsNull() { var exporter = new XlsxExporter(); Assert.NotNull(Record.Exception(() => exporter.ExportToFiles(null, NullLogger.Instance))); }