public static void Write(SubFlows subFlows, string location) { if (!subFlows.IsEmpty()) { string fileName = string.Format(@"{0}\{1}-{2}.html", location, "Report", subFlows.FlowName); File.WriteAllText(fileName, HtmlGenerator.GenerateReport(subFlows)); } }
public static string GenerateReport(SubFlows subFlows) { StringBuilder builder = new StringBuilder(); AppendHeader(subFlows.FlowName, builder); builder.AppendLine("<body>"); builder.AppendLine("<div>"); int index = 1; foreach (SubFlow subFlow in subFlows) Add(builder, subFlow, index++); builder.AppendLine("</div>"); builder.AppendLine("</body>"); builder.AppendLine("</html>"); return builder.ToString(); }
public static string GenerateReport(SubFlows subFlows) { StringBuilder builder = new StringBuilder(); AppendHeader(subFlows.FlowName, builder); builder.AppendLine("<body>"); builder.AppendLine("<div>"); int index = 1; foreach (SubFlow subFlow in subFlows) { Add(builder, subFlow, index++); } builder.AppendLine("</div>"); builder.AppendLine("</body>"); builder.AppendLine("</html>"); return(builder.ToString()); }
public SubFlowsTest() { flows = new SubFlows("archiveLocation", "flowName"); }
public void SetUp() { flows = new SubFlows("archiveLocation", "flowName"); }
public SessionReport(string archiveLocation, string name) { subFlows = new SubFlows(archiveLocation, name); }
public SubFlowsTests() { flows = new SubFlows("archiveLocation", "flowName"); }
public SubFlowsTests() { var currentAssemblyDirectory = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); flows = new SubFlows(Path.Combine(currentAssemblyDirectory, "archiveLocation"), "flowName"); }
public override bool TryParse() { if (!base.TryParse()) { return(false); } // iterations, groups, flows, branches, bcs Iterations.Clear(); Groups.Clear(); SubFlows.Clear(); Branches.Clear(); BusinessComponents.Clear(); RecoverySteps.Clear(); GeneralSteps.Clear(); ReportNodeType[] childNodes = Node.ReportNode; if (childNodes != null) { foreach (ReportNodeType node in childNodes) { // business component BusinessComponentReport bc = BusinessComponents.TryParseAndAdd(node, this.Node); if (bc != null) { AllBCsEnumerator.Add(bc); continue; } // iteration IterationReport iteration = Iterations.TryParseAndAdd(node, this.Node); if (iteration != null) { AllBCsEnumerator.Merge(iteration.AllBCsEnumerator); continue; } // group GroupReport group = Groups.TryParseAndAdd(node, this.Node); if (group != null) { AllBCsEnumerator.Merge(group.AllBCsEnumerator); continue; } // flow FlowReport flow = SubFlows.TryParseAndAdd(node, this.Node); if (flow != null) { AllBCsEnumerator.Merge(flow.AllBCsEnumerator); continue; } // branch BranchReport branch = Branches.TryParseAndAdd(node, this.Node); if (branch != null) { AllBCsEnumerator.Merge(branch.AllBCsEnumerator); continue; } // recovery step RecoveryStepReport recovery = RecoverySteps.TryParseAndAdd(node, this.Node); if (recovery != null) { AllBCsEnumerator.Merge(recovery.AllBCsEnumerator); continue; } // general step GeneralStepReport generalStep = GeneralSteps.TryParseAndAdd(node, this.Node); if (generalStep != null) { AllBCsEnumerator.Merge(generalStep.AllBCsEnumerator); continue; } } } return(true); }