Class FailureExpectation
- java.lang.Object
-
- software.amazon.smithy.smoketests.traits.FailureExpectation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FailureExpectation
anyError()
boolean
equals(java.lang.Object o)
static FailureExpectation
errorWithId(ShapeId errorId)
static FailureExpectation
fromNode(Node node)
java.util.Optional<ShapeId>
getErrorId()
Gets the ID of the expected error shape.int
hashCode()
Node
toNode()
Converts a value to aNode
.
-
-
-
Method Detail
-
anyError
public static FailureExpectation anyError()
- Returns:
- Creates a failure expectation that the service call will result in any error response.
-
errorWithId
public static FailureExpectation errorWithId(ShapeId errorId)
- 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
public java.util.Optional<ShapeId> 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.
-
fromNode
public static FailureExpectation fromNode(Node node)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-