Skip to content

Compono.CompositionBuilderExtensions

Compono.TestDoubles

Compono

CompositionBuilderExtensions Class

Activates GeneratedTestDoubleProvider on a CompositionBuilder. See ADR-0043's "Runtime activation and precedence".

public static class CompositionBuilderExtensions

Inheritance System.Object → CompositionBuilderExtensions

Methods
UseGeneratedTestDoubles(this CompositionBuilder) Registers a GeneratedTestDoubleProvider. Call this \<b>before\</b>UseNSubstitute() (or any other test-double provider) when both are installed - stage 6 providers are tried in registration order, and a generated double should win over a generic substitute whenever both could satisfy the same interface. See ADR-0043's "Runtime activation and precedence".