public void CreateSheet(int yellowBand, int greenBand, ParsedData parsedData) { SetPercentageBands(yellowBand, greenBand); parsedData.ThrowIfNull("parsedData"); IRow row = sheet.CreateRow(0); row.CreateHeadings(ColAssemblyFileName, "AssemblyFileName", "ClassName", "TestName", "Outcome", "DurationInSeconds", "DurationInSecondsHuman", "ErrorMessage", "StackTrace", "StartTime", "EndTime", "ResultsPathName", "ResultsFileName", "AssemblyPathName", "FullClassName", "ComputerName", "TestResultFileType"); sheet.SetColumnWidths(ColAssemblyFileName, 10000, 10000, 10000, 3000, 3000, 3000, 3000, 5500, 5500); int i = 1; foreach (var r in parsedData.ResultLines.SortedByFailedOtherPassed) { row = sheet.CreateRow(i); row.SetCell(ColAssemblyFileName, r.AssemblyFileName); row.SetCell(ColClassName, r.ClassName); row.SetCell(ColTestName, r.TestName); row.SetCell(ColOutcome, r.Outcome); row.SetCell(ColDurationInSeconds, r.DurationInSeconds).Format("0.00").ApplyStyle(); row.SetCell(ColDurationInSecondsHuman, r.DurationHuman).Alignment(HorizontalAlignment.Right).ApplyStyle(); row.SetCell(ColErrorMessage, r.ErrorMessage); row.SetCell(ColStackTrace, r.StackTrace); if (r.StartTime != null) { row.SetCell(ColStartTime, r.StartTime.Value).FormatLongDate().ApplyStyle(); } if (r.EndTime != null) { row.SetCell(ColEndTime, r.EndTime.Value).FormatLongDate().ApplyStyle(); } row.SetCell(ColResultsPathName, r.ResultsPathName); row.SetCell(ColResultsFileName, r.ResultsFileName); row.SetCell(ColAssemblyPathName, r.AssemblyPathName); row.SetCell(ColFullClassName, r.FullClassName); row.SetCell(ColComputerName, r.ComputerName); row.SetCell(ColTestResultFileType, r.TestResultFileType.ToString()); i++; } sheet.FreezeTopRow(); ApplyOutcomeFormattingRules(i); }
public void CreateSheet(int yellowBand, int greenBand, ParsedData parsedData) { SetPercentageBands(yellowBand, greenBand); this.parsedData = parsedData.ThrowIfNull("parsedData"); maxColumnUsed = ColTotal + parsedData.OutcomeNames.Count(); int rowNum = CreateSummary(ByTestAssembly, 0, parsedData.SummaryByAssembly, parsedData.OutcomeNames); rowNum++; rowNum = CreateSummary(ByTestClass, rowNum, parsedData.SummaryByClass, parsedData.OutcomeNames); rowNum++; CreateSlowestTests(rowNum, parsedData.SlowestTests); sheet.SetColumnWidths(ColAssembly, 12000, 12000, 4000, 4000, 2500); for (int colNum = ColTotal; colNum <= maxColumnUsed; colNum++) { sheet.SetColumnWidth(colNum, 3000); } }
public void CreateSheet(int yellowBand, int greenBand, ParsedData parsedData) { SetPercentageBands(yellowBand, greenBand); parsedData.ThrowIfNull("parsedData"); IRow row = sheet.CreateRow(0); row.CreateHeadings(ColAssemblyFileName, "AssemblyFileName", "ClassName", "TestName", "Outcome", "DurationInSeconds", "DurationInSecondsHuman", "ErrorMessage", "StackTrace", "StartTime", "EndTime", "ResultsPathName", "ResultsFileName", "AssemblyPathName", "FullClassName", "ComputerName", "TestResultFileType"); sheet.SetColumnWidths(ColAssemblyFileName, 10000, 10000, 10000, 3000, 3000, 3000, 3000, 5500, 5500); int i = 1; foreach (var r in parsedData.ResultLines.SortedByFailedOtherPassed) { row = sheet.CreateRow(i); row.SetCell(ColAssemblyFileName, r.AssemblyFileName); row.SetCell(ColClassName, r.ClassName); row.SetCell(ColTestName, r.TestName); row.SetCell(ColOutcome, r.Outcome); row.SetCell(ColDurationInSeconds, r.DurationInSeconds).Format("0.00").ApplyStyle(); row.SetCell(ColDurationInSecondsHuman, r.DurationHuman).Alignment(HorizontalAlignment.Right).ApplyStyle(); row.SetCell(ColErrorMessage, r.ErrorMessage); row.SetCell(ColStackTrace, r.StackTrace); if (r.StartTime != null) row.SetCell(ColStartTime, r.StartTime.Value).FormatLongDate().ApplyStyle(); if (r.EndTime != null) row.SetCell(ColEndTime, r.EndTime.Value).FormatLongDate().ApplyStyle(); row.SetCell(ColResultsPathName, r.ResultsPathName); row.SetCell(ColResultsFileName, r.ResultsFileName); row.SetCell(ColAssemblyPathName, r.AssemblyPathName); row.SetCell(ColFullClassName, r.FullClassName); row.SetCell(ColComputerName, r.ComputerName); row.SetCell(ColTestResultFileType, r.TestResultFileType.ToString()); i++; } sheet.FreezeTopRow(); ApplyOutcomeFormattingRules(i); }