Exemplo n.º 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);
 }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
 public TestSelection Select(TestNodePredicate predicate)
 {
     return(Select(predicate, null));
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
        }
Exemplo n.º 6
0
 public TestSelection Select(TestNodePredicate predicate)
 {
     return Select(predicate, null);
 }