Class RequiresWorkerAttribute<TProgram>
Skips the test unless the run hosts the worker program TProgram with
AddWorkerHost<TProgram>(). The check is the worker capability that registration
declares, keyed by the program assembly's name, so a typo in a string cannot turn a missing worker
into a plausible skip.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class RequiresWorkerAttribute<TProgram> : RequiresCapabilityAttribute, IProtoSkipCondition where TProgram : class
Type Parameters
TProgram
- Inheritance
-
RequiresWorkerAttribute<TProgram>
- Implements
- Inherited Members
- Extension Methods
Examples
[RequiresWorker<BillingWorker>]
public async Task AnEventBecomesAnInvoice() { ... }
Constructors
RequiresWorkerAttribute()
public RequiresWorkerAttribute()
Properties
DefaultReason
protected override string DefaultReason { get; }