<PackageReference Include="NUnit" Version="3.5.0" />

TestActionItem

public class TestActionItem
TestActionItem represents a single execution of an ITestAction. It is used to track whether the BeforeTest method has been called and suppress calling the AfterTest method if it has not.
public TestActionItem(ITestAction action)

Construct a TestActionItem

public void AfterTest(ITest test)

Run the AfterTest action, but only if the BeforeTest action was actually run.

public void BeforeTest(ITest test)

Run the BeforeTest method of the action and remember that it has been run.