Struct ContainerStartResult<TResource>
- Namespace
- ProtoTest.Testcontainers
- Assembly
- ProtoTest.Testcontainers.dll
The outcome of starting a container without throwing: the started resource, or the reason it could not start. A machine without a container runtime should be able to fall back or skip rather than fail the run, so a fixture decides on the result before registering the container.
public readonly record struct ContainerStartResult<TResource> : IEquatable<ContainerStartResult<TResource>> where TResource : class
Type Parameters
TResource
- Implements
-
IEquatable<ContainerStartResult<TResource>>
- Inherited Members
- Extension Methods
Constructors
ContainerStartResult(TResource?, string?)
The outcome of starting a container without throwing: the started resource, or the reason it could not start. A machine without a container runtime should be able to fall back or skip rather than fail the run, so a fixture decides on the result before registering the container.
public ContainerStartResult(TResource? Resource, string? Error)
Parameters
ResourceTResourceErrorstring
Properties
Error
public string? Error { get; init; }
Property Value
Resource
public TResource? Resource { get; init; }
Property Value
- TResource
Started
Whether the container started and Resource is the live one.
public bool Started { get; }