Table of Contents

Class CompositeWorkItem

Namespace
NUnit.Framework.Internal.Execution
Assembly
nunit.framework.dll

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 TestSuite

The TestSuite to be executed

childFilter ITestFilter

A filter used to select child tests

Properties

Children

List of Child WorkItems

public List<WorkItem> Children { get; }

Property Value

List<WorkItem>

IsolateChildTests

Indicates whether this work item should use a separate dispatcher.

public override bool IsolateChildTests { get; }

Property Value

bool

Methods

Cancel(bool)

Cancel (abort or stop) a CompositeWorkItem and all of its children

public override void Cancel(bool force)

Parameters

force bool

true 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()