Class RequiresCapabilityAttribute
Skips the test unless the host is composed with a capability of the given kind - for example a test-side domain that only exists when the suite owns the store. The kind is open, like capability kinds themselves; ProtoCapabilityKinds lists the built-in ones.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RequiresCapabilityAttribute : ProtoAttribute, IProtoSkipCondition
- Inheritance
-
RequiresCapabilityAttribute
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
RequiresCapabilityAttribute(string)
public RequiresCapabilityAttribute(string kind)
Parameters
kindstring
Properties
CapabilityName
The capability name within the kind, when a specific one is required.
public string? CapabilityName { get; init; }
Property Value
DefaultReason
protected virtual string DefaultReason { get; }
Property Value
Kind
The capability kind the test needs.
public string Kind { get; }
Property Value
Reason
The reason reported when the capability is missing.
public string? Reason { get; init; }
Property Value
Methods
GetSkipReason(ProtoHost)
Returns the reason to skip, or null when the test can run.
public string? GetSkipReason(ProtoHost host)
Parameters
hostProtoHost