Interface IProtoRunHook

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Defines lifecycle hooks that run once per test suite execution (before all tests start and after all tests finish).

public interface IProtoRunHook
Extension Methods

Properties

Order

Execution order for the hook. Lower numbers run earlier during setup and later during teardown.

int Order { get; }

Property Value

int

Methods

AfterRunAsync(CancellationToken)

Executed once asynchronously after all tests in the suite have completed.

Task AfterRunAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

BeforeRunAsync(CancellationToken)

Executed once asynchronously prior to running any tests in the suite.

Task BeforeRunAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task