Class TestMethodCommand
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
TestMethodThe 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
TestExecutionContextThe execution context