Table of Contents

Class TestMethodCommand

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

TestMethodCommand is the lowest level concrete command used to run actual test cases.

public class TestMethodCommand : TestCommand
Inheritance
TestMethodCommand
Inherited Members

Constructors

TestMethodCommand(TestMethod)

Initializes a new instance of the TestMethodCommand class.

public TestMethodCommand(TestMethod testMethod)

Parameters

testMethod TestMethod

The test.

Methods

Execute(TestExecutionContext)

Runs the test, saving a TestResult in the execution context, as well as returning it. If the test has an expected result, it is asserts on that value. Since failed tests and errors throw an exception, this command must be wrapped in an outer command, will handle that exception and records the failure. This role is usually played by the SetUpTearDown command.

public override TestResult Execute(TestExecutionContext context)

Parameters

context TestExecutionContext

The execution context

Returns

TestResult