Table of Contents

Class FileBasedDslOptionsBuilder

Namespace
TinyBDD.Extensions.FileBased.Configuration
Assembly
TinyBDD.Extensions.FileBased.dll

Fluent builder for configuring file-based DSL scenarios.

public sealed class FileBasedDslOptionsBuilder
Inheritance
FileBasedDslOptionsBuilder
Inherited Members

Methods

AddFeatureFiles(string)

Adds Gherkin .feature files matching the specified pattern. This is the recommended first-class approach for file-based scenarios.

public FileBasedDslOptionsBuilder AddFeatureFiles(string pattern)

Parameters

pattern string

File pattern (e.g., "Features/**/*.feature").

Returns

FileBasedDslOptionsBuilder

This builder for chaining.

Remarks

Note: Only one parser type can be active at a time. Calling this method will set the parser to GherkinDslParser, overriding any previously set parser. To use multiple file formats, call this method multiple times with different patterns, or use WithParser() with a custom parser that handles multiple formats.

AddYamlFiles(string)

Adds YAML files matching the specified pattern.

public FileBasedDslOptionsBuilder AddYamlFiles(string pattern)

Parameters

pattern string

File pattern (e.g., "Features/**/*.yml").

Returns

FileBasedDslOptionsBuilder

This builder for chaining.

Remarks

Note: Only one parser type can be active at a time. Calling this method will set the parser to YamlDslParser, overriding any previously set parser. To use multiple file formats, call this method multiple times with different patterns, or use WithParser() with a custom parser that handles multiple formats.

Build()

Builds the configuration options.

public FileBasedDslOptions Build()

Returns

FileBasedDslOptions

The configured options.

UseApplicationDriver<TDriver>()

Sets the application driver type to use for executing scenarios.

public FileBasedDslOptionsBuilder UseApplicationDriver<TDriver>() where TDriver : IApplicationDriver

Returns

FileBasedDslOptionsBuilder

This builder for chaining.

Type Parameters

TDriver

The driver type.

WithBaseDirectory(string)

Sets the base directory for resolving relative file paths.

public FileBasedDslOptionsBuilder WithBaseDirectory(string baseDirectory)

Parameters

baseDirectory string

The base directory path.

Returns

FileBasedDslOptionsBuilder

This builder for chaining.

WithParser(IDslParser)

Sets a custom DSL parser.

public FileBasedDslOptionsBuilder WithParser(IDslParser parser)

Parameters

parser IDslParser

The parser to use.

Returns

FileBasedDslOptionsBuilder

This builder for chaining.