BddScenario class
Represents a Gherkin Scenario.
A BddScenario is a single test case within a BddFeature. It contains a description and a series of steps (Given, When, Then, And, But) that define the behavior being tested.
If the scenario contains an BddExample, it will be rendered as a "Scenario Outline" in Gherkin format, allowing parameterization of steps.
Constructors
- BddScenario(BddFramework bdd, String text)
-
Creates a new BddScenario with the given
textdescription.
Properties
- bdd → BddFramework
-
finalinherited
- containsExample → bool
-
Returns true if this scenario contains examples (tables).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNote → bool
-
Whether this term is a note, added with
.note(). Notes are exported as Gherkin comments, not as steps.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
finalinherited
- variation → _Variation
-
finalinherited
Methods
-
given(
String text) → BddGiven - Creates a Given step that sets up the initial context of the scenario.
-
keyword(
BddConfig config) → String -
Returns the keyword for this scenario: "Scenario:" or "Scenario Outline:"
when examples are present.
override
-
keywordPrefix(
BddConfig config) → String -
Returns the keyword prefix configuration.
override
-
keywordSuffix(
BddConfig config) → String -
Returns the keyword suffix configuration.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
note(
String text) → BddGiven - Creates a Note step for adding comments to the scenario.
-
prefix(
BddConfig config) → String -
Returns the prefix for the scenario text.
override
-
spaces(
BddConfig config) → String -
Returns the indentation string for this term based on BddConfig.
override
-
suffix(
BddConfig config) → String -
Returns the suffix for the scenario text.
override
-
then(
String text) → BddThen - Creates a Then step that describes the expected outcome or result.
-
toString(
[BddConfig config = BddConfig._default]) → String -
Returns the Gherkin string representation of this scenario.
override
-
when(
String text) → BddWhen - Creates a When step that describes the action or event.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited