Interface IApplicationDriver
- Namespace
- TinyBDD.Extensions.FileBased.Core
- Assembly
- TinyBDD.Extensions.FileBased.dll
Defines the contract for application drivers that execute file-based scenario steps.
public interface IApplicationDriver
Examples
public partial class MyApplicationDriver : IApplicationDriver
{
[DriverMethod("register user")]
public async Task RegisterUser(string email)
{
// Implementation
}
}
Remarks
Application drivers serve as the execution surface for file-based tests, providing methods that map to steps in scenario files. Implementations can be partial classes with source-generated method implementations, or fully hand-written.
Methods
CleanupAsync(CancellationToken)
Called after scenario execution completes (success or failure).
Task CleanupAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
InitializeAsync(CancellationToken)
Called before scenario execution begins.
Task InitializeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken