Example #1
0
 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);
 }
Example #2
0
        public TestSelection Select(TestNodePredicate predicate, Comparison<TestNode> comparer)
        {
            var selection = new TestSelection();

            Accumulate(selection, this, predicate);

            if (comparer != null)
                selection.Sort(comparer);

            return selection;
        }
Example #3
0
 public TestSelection Select(TestNodePredicate predicate)
 {
     return(Select(predicate, null));
 }
Example #4
0
 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);
 }
Example #5
0
        public TestSelection Select(TestNodePredicate predicate, Comparison<TestNode> comparer)
        {
            var selection = new TestSelection();

            Accumulate(selection, this, predicate);

            if (comparer != null)
                selection.Sort(comparer);

            return selection;
        }
Example #6
0
 public TestSelection Select(TestNodePredicate predicate)
 {
     return Select(predicate, null);
 }