Class SmokeTestCase

java.lang.Object
software.amazon.smithy.smoketests.traits.SmokeTestCase
All Implemented Interfaces:
ToNode, Tagged, ToSmithyBuilder<SmokeTestCase>

public final class SmokeTestCase extends Object implements Tagged, ToNode, ToSmithyBuilder<SmokeTestCase>
Defines a single smoke test case.
  • Method Details

    • builder

      public static SmokeTestCase.Builder builder()
      Returns:
      Creates a builder used to build a SmokeTestCase.
    • fromNode

      public static SmokeTestCase fromNode(Node node)
      Creates a SmokeTestCase from a Node.
      Parameters:
      node - Node to deserialize into a SmokeTestCase.
      Returns:
      Returns the created SmokeTestCase.
    • getId

      public String getId()
      Get the ID of this test case.

      This ID is unique across all smoke test cases for all operations bound to the same service, and can be used to generate test case names.

      Returns:
      Returns the smoke test case ID.
    • getParams

      public Optional<ObjectNode> getParams()
      Get the input parameters of this test case.

      These parameters, if present, are passed to the operation the smoke test targets. If not present, the operation does not have any input.

      Returns:
      Returns the optionally present input parameters.
    • getVendorParams

      public Optional<ObjectNode> getVendorParams()
      Get the vendor-specific parameters of this test case.

      These are custom parameters that can be used to influence the request for this test case.

      These parameters match the shape id returned by getVendorParamsShape(), if present.

      Returns:
      Returns the optionally present vendor-specific parameters.
      See Also:
    • getVendorParamsShape

      public Optional<ShapeId> getVendorParamsShape()
      Get the shape ID of vendor-specific parameters used by this test case.

      If present, getVendorParams() will match this shape's definition.

      Returns:
      The optionally present shape ID of vendor-specific parameters.
      See Also:
    • getExpectation

      public Expectation getExpectation()
      Get the expected response from the service call for this test case.

      This expectation can be either a successful response, any error response, or a specific error response.

      Returns:
      Returns expectation.
    • getTags

      public List<String> getTags()
      Description copied from interface: Tagged
      Gets the tags applied to an object.
      Specified by:
      getTags in interface Tagged
      Returns:
      Returns the tag values.
    • toBuilder

      public SmokeTestCase.Builder toBuilder()
      Description copied from interface: ToSmithyBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<SmokeTestCase>
      Returns:
      a builder for type T
    • toNode

      public Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns:
      Returns the creates Node.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object