本文整理汇总了C#中DataDictionary.RunUntilStep方法的典型用法代码示例。如果您正苦于以下问题:C# DataDictionary.RunUntilStep方法的具体用法?C# DataDictionary.RunUntilStep怎么用?C# DataDictionary.RunUntilStep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataDictionary
的用法示例。
在下文中一共展示了DataDictionary.RunUntilStep方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTestCaseSection
/// <summary>
/// Creates a section for a given test case
/// </summary>
/// <param name="runner">The runner to be used to execute the tests</param>
/// <param name="aFrame">Frame to be displayed</param>
/// <param name="aReportConfig">The report configuration containing display details</param>
/// <param name="activatedRuleConditions">The list that will contain the rules activated by this test case</param>
/// <returns></returns>
public void CreateTestCaseSection(DataDictionary.Tests.Runner.Runner runner, TestCase aTestCase, TestsCoverageReportHandler aReportConfig, HashSet<RuleCondition> activatedRuleConditions, bool createPdf)
{
AddSubParagraph("Test case " + aTestCase.Name);
if (aTestCase.Requirements.Count > 0)
{
AddParagraph("This test case verifies the following requirements");
foreach (DataDictionary.ReqRef reqRef in aTestCase.Requirements)
{
string text = "Requirement " + reqRef.Name;
if (!Utils.Utils.isEmpty(reqRef.Comment))
{
text = text + " : " + reqRef.Comment;
}
AddListItem(text);
}
}
runner.RunUntilStep(null);
activatedRuleConditions.UnionWith(runner.EventTimeLine.GetActivatedRules());
string title = "Test case " + aTestCase.Name;
CreateTable(title,
runner.EventTimeLine.GetActivatedRules(),
aReportConfig.Dictionary.ImplementedRules,
aReportConfig.AddActivatedRulesInTestCases,
aReportConfig.AddNonCoveredRulesInTestCases);
if (createPdf && aReportConfig.AddSteps)
{
foreach (Step step in aTestCase.Steps)
{
if (step.SubSteps.Count > 0)
{
AddSubParagraph(String.Format("Step {0}", step.Name));
DataDictionary.Tests.SubStep firstSubStep = step.SubSteps[0] as DataDictionary.Tests.SubStep;
DataDictionary.Tests.SubStep lastSubStep = step.SubSteps[step.SubSteps.Count - 1] as DataDictionary.Tests.SubStep;
double start = runner.EventTimeLine.GetSubStepActivationTime(firstSubStep);
double end = runner.EventTimeLine.GetNextSubStepActivationTime(lastSubStep);
List<RuleCondition> activatedRules = runner.EventTimeLine.GetActivatedRulesInRange(start, end);
CreateStepTable(runner, step, aTestCase.Dictionary.ImplementedRules.Count, activatedRules, aReportConfig);
if (aReportConfig.AddLog)
{
List<DataDictionary.Tests.Runner.Events.ModelEvent> events = runner.EventTimeLine.GetEventsInRange((uint)start, (uint)end);
foreach (ModelEvent ev in events)
{
AddCode(ev.ToString());
}
}
CloseSubParagraph();
}
}
}
CloseSubParagraph();
}