Record Class Scenario.Step

java.lang.Object
java.lang.Record
codes.grow.packages.betterstack.testing.Scenario.Step
Record Components:
op - operation name
args - arguments object (empty object when absent)
expect - expectations object (empty object when absent)
save - variable name to store the result under, or null
requires - capabilities this step needs
Enclosing class:
Scenario

public static record Scenario.Step(String op, com.fasterxml.jackson.databind.JsonNode args, com.fasterxml.jackson.databind.JsonNode expect, String save, List<String> requires) extends Record
One step of a scenario.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Step(String op, com.fasterxml.jackson.databind.JsonNode args, com.fasterxml.jackson.databind.JsonNode expect, String save, List<String> requires)
    Creates a step; the list is copied.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JsonNode
    Returns the value of the args record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    com.fasterxml.jackson.databind.JsonNode
    Returns the value of the expect record component.
    final int
    Returns a hash code value for this object.
    op()
    Returns the value of the op record component.
    Returns the value of the requires record component.
    Returns the value of the save record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Step

      public Step(String op, com.fasterxml.jackson.databind.JsonNode args, com.fasterxml.jackson.databind.JsonNode expect, String save, List<String> requires)
      Creates a step; the list is copied.
      Parameters:
      op - operation name
      args - arguments
      expect - expectations
      save - variable name or null
      requires - capabilities
  • 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.
    • op

      public String op()
      Returns the value of the op record component.
      Returns:
      the value of the op record component
    • args

      public com.fasterxml.jackson.databind.JsonNode args()
      Returns the value of the args record component.
      Returns:
      the value of the args record component
    • expect

      public com.fasterxml.jackson.databind.JsonNode expect()
      Returns the value of the expect record component.
      Returns:
      the value of the expect record component
    • save

      public String save()
      Returns the value of the save record component.
      Returns:
      the value of the save record component
    • requires

      public List<String> requires()
      Returns the value of the requires record component.
      Returns:
      the value of the requires record component