BeforeTestActionCommand
TestActionBeforeCommand handles the BeforeTest method of a single
TestActionItem, relying on the item to remember it has been run.
namespace NUnit.Framework.Internal.Commands
{
public class BeforeTestActionCommand : BeforeTestCommand
{
public BeforeTestActionCommand(TestCommand innerCommand, TestActionItem action)
: base(innerCommand)
{
Guard.ArgumentValid(innerCommand.Test is TestSuite, "TestActionBeforeCommand may only apply to a TestSuite", "innerCommand");
Guard.ArgumentNotNull(action, "action");
BeforeTest = delegate {
action.BeforeTest(base.Test);
};
}
}
}