Class ProtoContainerProviderExtensions
- Namespace
- ProtoTest.Testcontainers
- Assembly
- ProtoTest.Testcontainers.dll
Registers a container piece as a target provider.
public static class ProtoContainerProviderExtensions
- Inheritance
-
ProtoContainerProviderExtensions
- Inherited Members
Methods
UseContainer(IProtoProviderChainBuilder, IProtoInfrastructure)
Adds the container as a provider of the target's chain: it serves when the Docker daemon answers, starts at its registration position and fills the target's declared keys. Prefer a configured or AppHost provider earlier in the chain, so a run pointed at an existing environment never starts a container the environment already provides.
public static IProtoProviderChainBuilder UseContainer(this IProtoProviderChainBuilder chain, IProtoInfrastructure container)
Parameters
chainIProtoProviderChainBuilderThe target's provider chain.
containerIProtoInfrastructureThe container piece, for example
PostgresDatabase.Container(). It declares the target's keys and is started and released like any infrastructure piece.