BddDotNet.Gherkin.SourceGenerator
1.0.0-beta3
This is a prerelease version of BddDotNet.Gherkin.SourceGenerator.
dotnet add package BddDotNet.Gherkin.SourceGenerator --version 1.0.0-beta3
NuGet\Install-Package BddDotNet.Gherkin.SourceGenerator -Version 1.0.0-beta3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BddDotNet.Gherkin.SourceGenerator" Version="1.0.0-beta3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BddDotNet.Gherkin.SourceGenerator" Version="1.0.0-beta3" />
<PackageReference Include="BddDotNet.Gherkin.SourceGenerator" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BddDotNet.Gherkin.SourceGenerator --version 1.0.0-beta3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BddDotNet.Gherkin.SourceGenerator, 1.0.0-beta3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BddDotNet.Gherkin.SourceGenerator@1.0.0-beta3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BddDotNet.Gherkin.SourceGenerator&version=1.0.0-beta3&prerelease
#tool nuget:?package=BddDotNet.Gherkin.SourceGenerator&version=1.0.0-beta3&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Overview
Modern BDD framework for c# and .NET with gherkin support
Gherkin syntax example
Feature: Guess the word
# The first example has two steps
Scenario: Maker starts a game
When the Maker starts a game
Then the Maker waits for a Breaker to join
# The second example has three steps
Scenario: Breaker joins a game
Given the Maker has started a game with the word "silky"
When the Breaker joins the Maker's game
Then the Breaker must guess a word with 5 characters
CSharp syntax scenario example
Program.cs content:
using BddDotNet;
using Microsoft.Testing.Platform.Builder;
var builder = await TestApplication.CreateBuilderAsync(args);
var services = builder.AddBddDotNet();
services.Scenario<Program>("feature1", "scenario1", async context =>
{
await context.Given("this is given step");
await context.When("this is when step");
await context.Then("this is then step");
});
services.Given(new("this is given step"), () =>
{
Console.WriteLine("This is the given step.");
});
services.When(new("this is when step"), () =>
{
Console.WriteLine("This is the when step.");
});
services.Then(new("this is then step"), () =>
{
Console.WriteLine("This is the then step.");
});
using var testApp = await builder.BuildAsync();
return await testApp.RunAsync();
More info: https://github.com/Romfos/BddDotNet
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0-beta3 | 0 | 8/7/2025 |
1.0.0-beta2 | 10 | 8/4/2025 |
1.0.0-beta1 | 12 | 8/4/2025 |