Пример #1
0
 /// <summary>
 /// Gets steps based on the search pattern. Ignores child steps. Returns null if not found.
 /// </summary>
 /// <param name="stepSearch">Search pattern.</param>
 /// <returns></returns>
 public IEnumerable <ITestStep> GetSteps(TestStepSearch stepSearch)
 {
     return(this
            .Where(step => stepSearch == TestStepSearch.All ||
                   ((stepSearch == TestStepSearch.EnabledOnly) == step.Enabled)));
 }
Пример #2
0
 /// <summary>
 /// Recursively iterates steps and child steps to collect all steps in the list.
 /// </summary>
 /// <param name="stepSearch">Search pattern.</param>
 /// <returns></returns>
 public IEnumerable <ITestStep> RecursivelyGetAllTestSteps(TestStepSearch stepSearch)
 {
     return(Utils.FlattenHeirarchy(GetSteps(stepSearch), x => x.ChildTestSteps.GetSteps(stepSearch)));
 }