Class ProtoTestPreparation
A test method resolved once for execution: the attributes the host orders hooks from, the name the trace records, and the reason the test must skip, if any of the run's skip conditions apply.
public sealed record ProtoTestPreparation : IEquatable<ProtoTestPreparation>
- Inheritance
-
ProtoTestPreparation
- Implements
- Inherited Members
- Extension Methods
Constructors
ProtoTestPreparation(MethodInfo, string, IReadOnlyList<ProtoAttribute>, string?)
A test method resolved once for execution: the attributes the host orders hooks from, the name the trace records, and the reason the test must skip, if any of the run's skip conditions apply.
public ProtoTestPreparation(MethodInfo Method, string TestName, IReadOnlyList<ProtoAttribute> Attributes, string? SkipReason)
Parameters
MethodMethodInfoTestNamestringAttributesIReadOnlyList<ProtoAttribute>SkipReasonstring
Properties
Attributes
public IReadOnlyList<ProtoAttribute> Attributes { get; init; }
Property Value
CanRun
Whether the test can run; when false, SkipReason explains why.
public bool CanRun { get; }
Property Value
Method
public MethodInfo Method { get; init; }
Property Value
SkipReason
public string? SkipReason { get; init; }
Property Value
TestName
public string TestName { get; init; }
Property Value
Methods
StartAsync(ProtoHost, IProtoTestAttachmentPublisher?)
Starts the test lifecycle. Adapters raise their framework's own skip; this is everything else.
public Task<ProtoExecutionContext> StartAsync(ProtoHost host, IProtoTestAttachmentPublisher? attachmentPublisher = null)
Parameters
hostProtoHostattachmentPublisherIProtoTestAttachmentPublisher
Returns
StartAsync(ProtoHost, IProtoTestAttachmentPublisher?, CancellationToken)
Starts the test lifecycle with the runner's cancellation token, so setup I/O that can observe cancellation does; a runner whose extension point exposes no token passes None.
public Task<ProtoExecutionContext> StartAsync(ProtoHost host, IProtoTestAttachmentPublisher? attachmentPublisher, CancellationToken cancellationToken)
Parameters
hostProtoHostattachmentPublisherIProtoTestAttachmentPublishercancellationTokenCancellationToken