Class RequiresApplicationAttribute
Skips the test unless the suite declares the named application through AddApplication, so an
application-specific test reads as skipped when the suite was composed without it instead of failing
at the first accessor.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class RequiresApplicationAttribute : ProtoAttribute, IProtoSkipCondition
- Inheritance
-
RequiresApplicationAttribute
- Implements
- Inherited Members
- Extension Methods
Examples
[RequiresApplication("Api")]
public async Task ...() { ... }
Constructors
RequiresApplicationAttribute(string)
public RequiresApplicationAttribute(string name)
Parameters
namestring
Properties
Name
The application name the test needs.
public string Name { get; }
Property Value
Reason
The reason reported when the application 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