Table of Contents

Class StepPhrase

Namespace
Cress.Gherkin.Phrases
Assembly
Cress.Gherkin.dll

Maps a step operation (and optionally a required set of with-block keys) to a Gherkin keyword + phrase template.

public sealed record StepPhrase : IEquatable<StepPhrase>
Inheritance
StepPhrase
Implements
Inherited Members

Constructors

StepPhrase(string, GherkinKeyword, string, IReadOnlyList<string>?)

Maps a step operation (and optionally a required set of with-block keys) to a Gherkin keyword + phrase template.

public StepPhrase(string StepOp, GherkinKeyword Keyword, string Template, IReadOnlyList<string>? RequiredKeys = null)

Parameters

StepOp string

Step name, e.g. "ui.click".

Keyword GherkinKeyword

The natural Gherkin keyword for this operation.

Template string

Phrase template. Placeholders are {key} where key matches a with-block key. Example: "I click {automationId}"

RequiredKeys IReadOnlyList<string>

Optional set of keys that must be present in the with-block for this phrase to be selected. Used to distinguish overloads (e.g. testId variant of ui.click).

Properties

Keyword

The natural Gherkin keyword for this operation.

public GherkinKeyword Keyword { get; init; }

Property Value

GherkinKeyword

RequiredKeys

Optional set of keys that must be present in the with-block for this phrase to be selected. Used to distinguish overloads (e.g. testId variant of ui.click).

public IReadOnlyList<string>? RequiredKeys { get; init; }

Property Value

IReadOnlyList<string>

StepOp

Step name, e.g. "ui.click".

public string StepOp { get; init; }

Property Value

string

Template

Phrase template. Placeholders are {key} where key matches a with-block key. Example: "I click {automationId}"

public string Template { get; init; }

Property Value

string