private void Accumulate(TestSelection selection, TestNode testNode, TestNodePredicate predicate) { if (predicate(testNode)) selection.Add(testNode); else if (testNode.IsSuite) foreach (TestNode child in testNode.Children) Accumulate(selection, child, predicate); }
public TestSelection Select(TestNodePredicate predicate, Comparison<TestNode> comparer) { var selection = new TestSelection(); Accumulate(selection, this, predicate); if (comparer != null) selection.Sort(comparer); return selection; }
public TestSelection Select(TestNodePredicate predicate) { return(Select(predicate, null)); }
public TestSelection Select(TestNodePredicate predicate) { return Select(predicate, null); }