SimpleWorkItem
A SimpleWorkItem represents a single test case and is
marked as completed immediately upon execution. This
class is also used for skipped or ignored test suites.
using NUnit.Framework.Internal.Commands;
namespace NUnit.Framework.Internal.Execution
{
public class SimpleWorkItem : WorkItem
{
private TestCommand _command;
public SimpleWorkItem(TestMethod test)
: base(test)
{
_command = CommandBuilder.MakeTestCommand(test);
}
protected override void PerformWork()
{
try {
base.Result = _command.Execute(base.Context);
} finally {
WorkItemComplete();
}
}
}
}