Class SmokeTestCase
- java.lang.Object
-
- software.amazon.smithy.smoketests.traits.SmokeTestCase
-
- All Implemented Interfaces:
ToNode
,Tagged
,ToSmithyBuilder<SmokeTestCase>
public final class SmokeTestCase extends java.lang.Object implements Tagged, ToNode, ToSmithyBuilder<SmokeTestCase>
Defines a single smoke test case.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SmokeTestCase.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SmokeTestCase.Builder
builder()
boolean
equals(java.lang.Object o)
static SmokeTestCase
fromNode(Node node)
Creates aSmokeTestCase
from aNode
.Expectation
getExpectation()
Get the expected response from the service call for this test case.java.lang.String
getId()
Get the ID of this test case.java.util.Optional<ObjectNode>
getParams()
Get the input parameters of this test case.java.util.List<java.lang.String>
getTags()
Gets the tags applied to an object.java.util.Optional<ObjectNode>
getVendorParams()
Get the vendor-specific parameters of this test case.java.util.Optional<ShapeId>
getVendorParamsShape()
Get the shape ID of vendor-specific parameters used by this test case.int
hashCode()
SmokeTestCase.Builder
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.Node
toNode()
Converts a value to aNode
.
-
-
-
Method Detail
-
builder
public static SmokeTestCase.Builder builder()
- Returns:
- Creates a builder used to build a
SmokeTestCase
.
-
fromNode
public static SmokeTestCase fromNode(Node node)
Creates aSmokeTestCase
from aNode
.- Parameters:
node
- Node to deserialize into aSmokeTestCase
.- Returns:
- Returns the created
SmokeTestCase
.
-
getId
public java.lang.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 java.util.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 java.util.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()
-
getVendorParamsShape
public java.util.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:
getVendorParams()
-
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 java.util.List<java.lang.String> getTags()
Description copied from interface:Tagged
Gets the tags applied to an object.
-
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 interfaceToSmithyBuilder<SmokeTestCase>
- Returns:
- a builder for type T
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-