Class DerivationSelector
Selects which request derivations should be generated during test case generation. Use For(string) to create instances with a fluent API.
public class DerivationSelector
- Inheritance
-
DerivationSelector
- Inherited Members
Examples
options.DerivationSelectors = new[]
{
DerivationSelector.For("Delete"), // All Delete derivations
DerivationSelector.For("Delete").From("Create"), // Delete from Create only
DerivationSelector.For("Delete").From("Create").Variant("IfMatch") // Specific variant
};
Remarks
When generating test cases, derivations can produce many combinations. Use this selector to filter which derivations are actually generated:
- Filter by target operation (which operation is being derived)
- Filter by source operation (what it derives from)
- Filter by variant (e.g., "IfMatch" vs "IfNoneMatch")
Constructors
DerivationSelector()
Creates a new empty DerivationSelector. Prefer using For(string) for better readability.
public DerivationSelector()
Properties
FromOperations
The operations that the derivation sources from. If null, matches derivations from any source operation.
public IList<string> FromOperations { get; set; }
Property Value
Remarks
Currently, only single-source derivations are supported at runtime. This is a list to support future multi-source derivations.
TargetOperation
The name of the operation whose requests are being derived. This is the "target" of the derivation.
public string TargetOperation { get; set; }
Property Value
Variant
The specific variant label to match. If null, matches all variants.
public string Variant { get; set; }
Property Value
Methods
For(string)
Start building a selector for derivations targeting the specified operation.
public static DerivationSelectorBuilder For(string targetOperation)
Parameters
targetOperationstringThe operation whose requests are being derived.
Returns
- DerivationSelectorBuilder
A builder for further configuration.