Record Class ScenarioInfo
java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.gherkin.parser.ScenarioInfo
- Record Components:
featureTitle- the name of the enclosingFeature, e.g."User authentication"; used to group scenarios by feature in the generated reporttitle- the formatted scenario title, e.g."Scenario: User logs in", or"Scenario Outline: User logs in as alice"for one row of an outlinesteps- the text of eachGiven/When/Then/And/Butstep in document order, with the keyword stripped and, for an outline row, the row'sExamplesvalues substituted for its<placeholder>s; empty when the scenario has no stepsoutlineTitle- for oneExamplesrow of aScenario Outline, the title that outline as a whole would carry - the same formatting astitle, but with the outline's own name left unsubstituted, e.g."Scenario Outline: User logs in as <username>";nullfor every scenario that isn't an expanded row. This is the title the scenario was reported under before outlines were expanded, which is what letsReinterpretedOutlinesrecognise a progress history record that this expansion, rather than an edit to the feature files, has superseded
public record ScenarioInfo(String featureTitle, String title, List<String> steps, String outlineTitle)
extends Record
Immutable description of a single scenario parsed from a
.feature file - for a
Scenario Outline, one of these per Examples row rather than one per outline, with
that row's values already substituted into both title and steps (see
FeatureParser).-
Constructor Summary
ConstructorsConstructorDescriptionScenarioInfo(String featureTitle, String title, List<String> steps) Defensively copiesstepsinto an immutable list. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefeatureTitlerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoutlineTitlerecord component.steps()Returns the value of thestepsrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScenarioInfo
- Parameters:
featureTitle- the name of the enclosingFeaturetitle- the formatted scenario titlesteps- the text of each step, in document order
-
ScenarioInfo
Defensively copiesstepsinto an immutable list.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
featureTitle
Returns the value of thefeatureTitlerecord component.- Returns:
- the value of the
featureTitlerecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
steps
Returns the value of thestepsrecord component.- Returns:
- the value of the
stepsrecord component
-
outlineTitle
Returns the value of theoutlineTitlerecord component.- Returns:
- the value of the
outlineTitlerecord component
-