WorkItem
A WorkItem may be an individual test case, a fixture or
a higher level grouping of tests. All WorkItems inherit
from the abstract WorkItem class, which uses the template
pattern to allow derived classes to perform work in
whatever way is needed.
A WorkItem is created with a particular TestExecutionContext
and is responsible for re-establishing that context in the
current thread before it begins or resumes execution.
The execution context
The ParallelExecutionStrategy to use for this work item
Filter used to include or exclude child tests
Indicates whether this work item should use a separate dispatcher.
The name of the work item - defaults to the Test name.
Gets the ParallelScope associated with the test, if any,
otherwise returning ParallelScope.Default;
The test result
Gets the current state of the WorkItem
The test being executed by the work item
The worker executing this item.
Event triggered when the item is complete
Construct a WorkItem for a particular test.
Construct a work Item that wraps another work Item.
Wrapper items are used to represent independently
dispatched tasks, which form part of the execution
of a single test, such as OneTimeTearDown.
protected List<SetUpTearDownItem> BuildSetUpTearDownList(MethodInfo[] setUpMethods, MethodInfo[] tearDownMethods)
Builds the set up tear down list.
Cancel (abort or stop) a WorkItem
Changes the result of the test, logging the old and new states
Standard Dispose
Execute the current work item, including any
child work items.
Initialize the TestExecutionContext. This must be done
before executing the WorkItem.
Marks the WorkItem as NotRunnable.
Method that performs actually performs the work. It should
set the State to WorkItemState.Complete when done.
Wait until the execution of this item is complete
Method called by the derived class when all work is complete