Table of Contents

Class TinyBddNUnitBase

Namespace
TinyBDD.NUnit
Assembly
TinyBDD.NUnit.dll

Base class for NUnit that initializes TinyBDD ambient context before each test and writes a Gherkin report after each test.

[Feature("Unnamed Feature", null)]
public abstract class TinyBddNUnitBase : TestBase
Inheritance
TinyBddNUnitBase
Inherited Members

Remarks

In TinyBdd_SetUp(), this class creates a ScenarioContext, sets Current, and wires an NUnitTraitBridge. In TinyBdd_TearDown(), it emits a Gherkin report and clears the ambient context.

Feature-level setup/teardown is supported via ConfigureFeatureSetup() and ConfigureFeatureTeardown(). These run once per test fixture via TinyBdd_OneTimeSetUp() and TinyBdd_OneTimeTearDown().

Properties

Reporter

The reporter used to emit scenario output (e.g., Gherkin-style summaries) at cleanup. Framework-specific base classes should provide an appropriate implementation.

protected override IBddReporter Reporter { get; }

Property Value

IBddReporter

Methods

TinyBdd_OneTimeSetUp()

Executes feature setup once before any tests in the fixture.

[OneTimeSetUp]
public void TinyBdd_OneTimeSetUp()

Remarks

This method is called by NUnit before any test methods run in the fixture. Override ConfigureFeatureSetup() to define feature-level setup steps.

TinyBdd_OneTimeTearDown()

Executes feature teardown once after all tests in the fixture complete.

[OneTimeTearDown]
public void TinyBdd_OneTimeTearDown()

Remarks

This method is called by NUnit after all test methods in the fixture complete. Override ConfigureFeatureTeardown() to define feature-level teardown steps.

TinyBdd_SetUp()

Initializes the TinyBDD ambient context and trait bridge.

[SetUp]
public void TinyBdd_SetUp()

Remarks

If you override ConfigureBackground(), call ExecuteBackgroundAsync(CancellationToken) at the start of your test or in a derived [SetUp] method.

TinyBdd_TearDown()

Writes a Gherkin report and clears the ambient context.

[TearDown]
public void TinyBdd_TearDown()