Class FailureExpectation
java.lang.Object
software.amazon.smithy.smoketests.traits.FailureExpectation
- All Implemented Interfaces:
ToNode
Defines the expected failure of a service call for a smoke test case.
This can be any error response, or a specific error response.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FailureExpectation
anyError()
boolean
static FailureExpectation
errorWithId
(ShapeId errorId) static FailureExpectation
Gets the ID of the expected error shape.int
hashCode()
toNode()
Converts a value to aNode
.
-
Method Details
-
anyError
- Returns:
- Creates a failure expectation that the service call will result in any error response.
-
errorWithId
- Parameters:
errorId
- Shape ID of the expected error.- Returns:
- Creates a failure expectation that the service call will result in an error matching the given shape ID.
-
getErrorId
Gets the ID of the expected error shape.If present, it indicates the call should throw a matching error. Otherwise, the call should throw any error.
- Returns:
- The ID of the expected error shape.
-
toNode
Description copied from interface:ToNode
Converts a value to aNode
. -
fromNode
-
equals
-
hashCode
public int hashCode()
-