Record Class ScenarioProgressRecord

java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.gherkin.progress.ScenarioProgressRecord
Record Components:
fingerprint - the stable identifier computed by ScenarioFingerprint
scenarioName - the scenario's current display name; not part of the key, refreshed on every run so a renamed-in-place scenario still shows its latest title
featureTitle - the scenario's current enclosing feature title; not part of the key, refreshed on every run so a scenario moved to a different feature shows that feature's title
listedAt - when the scenario was first observed as ScenarioStatus.LISTED, or null if it never has been
definedAt - when the scenario was first observed as ScenarioStatus.DEFINED, or null if it never has been
implementedAt - when the scenario was first observed as ScenarioStatus.IMPLEMENTED, or null if it never has been
lastSeenAt - when the scenario was last present in a run, or null for a record that has never actually been seen (should not occur in practice)
removedAt - when the scenario was first observed missing from a run, or null while it's still present in the current scan

public record ScenarioProgressRecord(String fingerprint, String scenarioName, String featureTitle, Instant listedAt, Instant definedAt, Instant implementedAt, Instant lastSeenAt, Instant removedAt) extends Record
Persisted, per-scenario history of when a scenario first reached each ScenarioStatus stage, keyed by ScenarioFingerprint.fingerprint(String) rather than by feature file location - so the history survives a scenario being moved between feature files.
  • Constructor Details

    • ScenarioProgressRecord

      public ScenarioProgressRecord(String fingerprint, String scenarioName, String featureTitle, Instant listedAt, Instant definedAt, Instant implementedAt, Instant lastSeenAt, Instant removedAt)
      Creates an instance of a ScenarioProgressRecord record class.
      Parameters:
      fingerprint - the value for the fingerprint record component
      scenarioName - the value for the scenarioName record component
      featureTitle - the value for the featureTitle record component
      listedAt - the value for the listedAt record component
      definedAt - the value for the definedAt record component
      implementedAt - the value for the implementedAt record component
      lastSeenAt - the value for the lastSeenAt record component
      removedAt - the value for the removedAt record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fingerprint

      public String fingerprint()
      Returns the value of the fingerprint record component.
      Returns:
      the value of the fingerprint record component
    • scenarioName

      public String scenarioName()
      Returns the value of the scenarioName record component.
      Returns:
      the value of the scenarioName record component
    • featureTitle

      public String featureTitle()
      Returns the value of the featureTitle record component.
      Returns:
      the value of the featureTitle record component
    • listedAt

      public Instant listedAt()
      Returns the value of the listedAt record component.
      Returns:
      the value of the listedAt record component
    • definedAt

      public Instant definedAt()
      Returns the value of the definedAt record component.
      Returns:
      the value of the definedAt record component
    • implementedAt

      public Instant implementedAt()
      Returns the value of the implementedAt record component.
      Returns:
      the value of the implementedAt record component
    • lastSeenAt

      public Instant lastSeenAt()
      Returns the value of the lastSeenAt record component.
      Returns:
      the value of the lastSeenAt record component
    • removedAt

      public Instant removedAt()
      Returns the value of the removedAt record component.
      Returns:
      the value of the removedAt record component