RunicTestWindowPresentationServiceCollectionExtensions class

Namespace Runic.Application.Testing in Runic.Application.Testing 0.23.0

public static class RunicTestWindowPresentationServiceCollectionExtensions

Registers RunicTestWindowPresentation for dependency injection.

Methods

AddRunicTestWindowPresentation

public static IServiceCollection AddRunicTestWindowPresentation(this IServiceCollection services, bool immediate = false)

Registers a RunicTestWindowPresentation per scope as the host of the scope's IRunicWindowPresentation, replacing the registration of AddRunicWindowService(), so the application's own registration method can run unchanged in the test.

Parameters

services

The test's services.

immediate

false, the default, delivers the fake's changes as an application's Window does: in a turn of the scope's model context after the request completed, with handler failures logged, and PlatformUnavailableReason.OwnerClosed once the scope is disposed. true makes the fake itself the scope's presentation, which raises its changes at once on the calling thread.

Returns

services.