C# Class NUnit.Framework.Internal.WorkItems.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.
Show file Open project: pjcollins/Andr.Unit

Protected Properties

Property Type Description
testResult TestResult

Public Methods

Method Description
CreateWorkItem ( System.Test test, TestExecutionContext context, ITestFilter filter ) : WorkItem
Execute ( ) : void

Execute the current work item, including any child work items.

WorkItem ( System.Test test, TestExecutionContext context ) : System

Construct a WorkItem for a particular test.

Protected Methods

Method Description
PerformWork ( ) : void

Method that performs actually performs the work. It should set the State to WorkItemState.Complete when done.

WorkItemComplete ( ) : void

Method called by the derived class when all work is complete

Private Methods

Method Description
RunTest ( ) : void
RunTestOnOwnThread ( int timeout ) : void

Method Details

CreateWorkItem() public static method

public static CreateWorkItem ( System.Test test, TestExecutionContext context, ITestFilter filter ) : WorkItem
test System.Test
context TestExecutionContext
filter ITestFilter
return WorkItem

Execute() public method

Execute the current work item, including any child work items.
public Execute ( ) : void
return void

PerformWork() protected abstract method

Method that performs actually performs the work. It should set the State to WorkItemState.Complete when done.
protected abstract PerformWork ( ) : void
return void

WorkItem() public method

Construct a WorkItem for a particular test.
public WorkItem ( System.Test test, TestExecutionContext context ) : System
test System.Test The test that the WorkItem will run
context TestExecutionContext The context to be used for running this test
return System

WorkItemComplete() protected method

Method called by the derived class when all work is complete
protected WorkItemComplete ( ) : void
return void

Property Details

testResult protected property

The result of running the test
protected TestResult testResult
return TestResult