IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
TestCommand is the abstract base class for all test commands in the framework. A TestCommand represents a single stage in the execution of a test, e.g.: SetUp/TearDown, checking for Timeout, verifying the returned result from a method, etc. More...
Public Member Functions | |
TestCommand (Test test) | |
Construct a TestCommand for a test. More... | |
abstract TestResult | Execute (TestExecutionContext context) |
Runs the test in a specified context, returning a TestResult. More... | |
Properties | |
Test | Test [get, private set] |
Gets the test associated with this command. More... | |
TestCommand is the abstract base class for all test commands in the framework. A TestCommand represents a single stage in the execution of a test, e.g.: SetUp/TearDown, checking for Timeout, verifying the returned result from a method, etc.
TestCommands may decorate other test commands so that the execution of a lower-level command is nested within that of a higher level command. All nested commands are executed synchronously, as a single unit. Scheduling test execution on separate threads is handled at a higher level, using the task dispatcher.
|
inline |
Construct a TestCommand for a test.
test | The test to be executed |
|
pure virtual |
Runs the test in a specified context, returning a TestResult.
context | The TestExecutionContext to be used for running the test. |
Implemented in NUnit.Framework.Attributes.Tests.CommandWrapperTests.ExpectedExceptionAttribute.ExpectedExceptionCommand, NUnit.Framework.RepeatAttribute.RepeatedTestCommand, NUnit.Framework.RetryAttribute.RetryCommand, NUnit.Framework.Internal.Commands.OneTimeSetUpCommand, NUnit.Framework.Internal.Commands.SetUpTearDownCommand, NUnit.Framework.Internal.Commands.OneTimeTearDownCommand, NUnit.Framework.Internal.Commands.TestMethodCommand, NUnit.Framework.Internal.Commands.TestActionCommand, NUnit.Framework.Internal.Commands.MaxTimeCommand, NUnit.Framework.Internal.Commands.SkipCommand, NUnit.Framework.Internal.Commands.ApplyChangesToContextCommand, and NUnit.Framework.Internal.Commands.TheoryResultCommand.
Referenced by NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformOneTimeSetUp(), NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformOneTimeTearDown(), and NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork().
|
getprivate set |
Gets the test associated with this command.
Referenced by NUnit.Framework.Internal.Commands.SetUpTearDownCommand.SetUpTearDownCommand(), and NUnit.Framework.Internal.Commands.TestActionCommand.TestActionCommand().