Class CompositeWorkItem
A CompositeWorkItem represents a test suite and encapsulates the execution of the suite as well as all its child tests.
public class CompositeWorkItem : WorkItem, IDisposable
- Inheritance
-
CompositeWorkItem
- Implements
- Inherited Members
Constructors
CompositeWorkItem(TestSuite, ITestFilter)
Construct a CompositeWorkItem for executing a test suite using a filter to select child tests.
public CompositeWorkItem(TestSuite suite, ITestFilter childFilter)
Parameters
suite
TestSuiteThe TestSuite to be executed
childFilter
ITestFilterA filter used to select child tests
Properties
Children
List of Child WorkItems
public List<WorkItem> Children { get; }
Property Value
IsolateChildTests
Indicates whether this work item should use a separate dispatcher.
public override bool IsolateChildTests { get; }
Property Value
Methods
Cancel(bool)
Cancel (abort or stop) a CompositeWorkItem and all of its children
public override void Cancel(bool force)
Parameters
force
booltrue if the CompositeWorkItem and all of its children should be aborted, false if it should allow all currently running tests to complete
PerformWork()
Method that actually performs the work. Overridden in CompositeWorkItem to do one-time setup, run all child items and then dispatch the one-time teardown work item.
protected override void PerformWork()