Class FailTestIfTestDataItemBad
- Namespace
- Acuit.Pinpoint.Workflows.Testing.Activities
- Assembly
- Acuit.Pinpoint.Workflows.Testing.dll
An activity that will fail the test if a test data item status is "bad."
public class FailTestIfTestDataItemBad : Activity, IActivity
- Inheritance
-
FailTestIfTestDataItemBad
- Implements
- Inherited Members
Remarks
This activity requires an IActiveTest service, which is normally provided by placing this activity within the body of a RecordTest activity.
Properties
FailReason
Gets or sets the fail reason to use when failing the test. If this is not set, then "Incorrect {Name}" will be used.
public ValueSource<string> FailReason { get; set; }
Property Value
Name
Gets or sets the test data item name. This is required.
public ValueSource<string> Name { get; set; }
Property Value
Methods
OnExecuteAsync(ActivityContext, CancellationToken)
Derived classes must implement this to perform the activity.
protected override Task OnExecuteAsync(ActivityContext context, CancellationToken cancellationToken)
Parameters
context
ActivityContextThe activity context.
cancellationToken
CancellationTokenThe cancellation token used to request canceling the activity.
Returns
- Task
A task that represents the asynchronous operation.
Exceptions
- ArgumentNullException
context
is null.- InvalidOperationException
A service required by the activity is not available, or a required activity property value is not set.
- Exception
An error occurred while performing the activity.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Remarks
This is expected to produce a string suitable for labeling this activity in a workflow diagram. It should be as specific as possible, but while keeping it very short. In general, it should be the short name of the class (as that is how it would typically be defined in the workflow XAML), optionally followed by other property values of interest in a diagram. The default implementation returns the short name of the class.