public void TestCaseSteps(TestCaseFull testCaseFull, string checkedProperties) { if (checkedProperties.IndexOf("Steps") != -1) { this.WriteLine(@"<li class=""TestCaseStepsWrapper"">"); this.WriteLine(@"<div>▶ Test Case Steps</div>"); this.WriteLine(@"<table class=""TestCaseSteps Collapsed"">"); this.WriteLine(@"<thead> <tr> <th>No</th> <th>Actions</th> <th>Expected Results</th> </tr> </thead>"); this.WriteLine("<tbody>"); if (testCaseFull.TestSteps.Count > 0) { int count = 1; foreach (TestStep currentTestStep in testCaseFull.TestSteps) { this.WriteLine(@"<tr>"); this.WriteLine(string.Format("<td>{0}</td>", count++)); string currentTestStepActionTitle = currentTestStep.ActionTitle.Replace("<", "<").Replace(">", ">").Replace("\r\n", "<br>").Replace("\n", "<br>"); string currentTestStepActionExpectedResult = currentTestStep.ActionExpectedResult.Replace("<", "<").Replace(">", ">").Replace("\r\n", "<br>").Replace("\n", "<br>"); this.WriteLine(string.Format("<td>{0}</td>", currentTestStepActionTitle)); this.WriteLine(string.Format("<td>{0}</td>", currentTestStepActionExpectedResult)); this.WriteLine(@"</tr>"); } } else { this.WriteLine(@"<tr>"); this.WriteLine(@"<td></td>"); this.WriteLine("<td>No Test Case Steps Available</td>"); this.WriteLine("<td>No Test Case Steps Available</td>"); this.WriteLine(@"</tr>"); } this.WriteLine("</tbody>"); this.WriteLine("</table></li>"); } }
public void TestCase(TestCase testCase, TestCaseFull testCaseFull, string comment, string status, string checkedProperties) { this.WriteLine(@"<li class=""TestCase NotFiltered"">"); this.TestCaseTitle(testCase, checkedProperties); this.WriteLine(@" <ul class=""TestCaseContent Collapsed"">"); this.TestCaseProperties(testCase, status, checkedProperties); this.TestCaseComment(comment, checkedProperties); this.TestCaseSteps(testCaseFull, checkedProperties); this.WriteLine("</ul>"); this.WriteLine("</li>"); }