Class ProtoProviderConditions

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

The canonical provider conditions: Configured for a target the environment already provides, Selected(string) for an integration-owned selection key, Available(string, Func<bool>) for a runtime probe, and Always for the fallback a chain ends with.

public static class ProtoProviderConditions
Inheritance
ProtoProviderConditions
Inherited Members

Properties

Always

Holds everywhere: the fallback provider a chain ends with.

public static IProtoProviderCondition Always { get; }

Property Value

IProtoProviderCondition

Configured

Holds when every configuration key the target declares has a value: the environment already provides what the provider would fill.

public static IProtoProviderCondition Configured { get; }

Property Value

IProtoProviderCondition

Methods

Available(string, Func<bool>)

Holds when the runtime probe succeeds. requirement names what the probe checks for the skip record and the no-provider error, for example "Docker is available". The probe runs once per resolution; an exception it throws propagates - a probe that cannot answer is a provider bug, not an unavailable environment.

public static IProtoProviderCondition Available(string requirement, Func<bool> probe)

Parameters

requirement string
probe Func<bool>

Returns

IProtoProviderCondition

Selected(string)

Holds when the integration-owned selection key has a value - a convention the run script sets as an environment variable, never a parameter of the provider itself.

public static IProtoProviderCondition Selected(string key)

Parameters

key string

Returns

IProtoProviderCondition

Selected(string, params string[])

Holds when any of the integration-owned selection keys has a value, so a provider with a broad switch and a per-target switch serves when either is set. Every key is a convention the run script sets as an environment variable, never a parameter of the provider itself.

public static IProtoProviderCondition Selected(string key, params string[] moreKeys)

Parameters

key string
moreKeys string[]

Returns

IProtoProviderCondition