DarkWS.Testing.DarkWsTestScope
DarkWS.Testing
DarkWS.Testing
DarkWsTestScope Class
A message scope for direct handler unit tests. It bypasses registration, authorization, initializers, and filters.
public sealed class DarkWsTestScope : System.IAsyncDisposable
Inheritance System.Object → DarkWsTestScope
Implements System.IAsyncDisposable
Properties
DarkWsTestScope.Services Property
Gets the scoped provider for resolving handlers and their dependencies.
public System.IServiceProvider Services { get; }
Property Value
Methods
DarkWsTestScope.DisposeAsync() Method
Disposes scoped dependencies asynchronously. Do not use initialized handlers afterwards.
public System.Threading.Tasks.ValueTask DisposeAsync();
Implements DisposeAsync()
Returns
System.Threading.Tasks.ValueTask
DarkWsTestScope.Initialize(HandlerBase) Method
Attaches this scope's context to a handler created by the test or resolved from Services.
public void Initialize(DarkWS.HandlerBase handler);
Parameters
handler DarkWS.HandlerBase