AfterTestActionCommand
TestActionAfterCommand handles the AfterTest method of a single
TestActionItem, provided the items BeforeTest has been run.
namespace NUnit.Framework.Internal.Commands
{
public class AfterTestActionCommand : AfterTestCommand
{
public AfterTestActionCommand(TestCommand innerCommand, TestActionItem action)
: base(innerCommand)
{
Guard.ArgumentValid(innerCommand.Test is TestSuite, "BeforeTestActionCommand may only apply to a TestSuite", "innerCommand");
Guard.ArgumentNotNull(action, "action");
AfterTest = delegate {
if (action.BeforeTestWasRun)
action.AfterTest(base.Test);
};
}
}
}