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 FailureExpectationanyError()booleanequals(java.lang.Object o)static FailureExpectationerrorWithId(ShapeId errorId)static FailureExpectationfromNode(Node node)java.util.Optional<ShapeId>getErrorId()Gets the ID of the expected error shape.inthashCode()NodetoNode()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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-