Class TestFailureExpectation
java.lang.Object
software.amazon.smithy.protocoltests.traits.TestFailureExpectation
- All Implemented Interfaces:
ToNode
Defines the expected failure of a test.
This can be any error response, or a specific error response.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TestFailureExpectationanyError()booleanstatic TestFailureExpectationerrorWithId(ShapeId errorId) Create an expectation that a test will fail with a specified error.static TestFailureExpectationGets the ID of the expected error shape.inthashCode()toNode()Converts a value to aNode.
-
Method Details
-
anyError
- Returns:
- Returns an expectation that a test will fail with an unspecified error.
-
errorWithId
Create an expectation that a test will fail with a specified error.- Parameters:
errorId- Shape ID of the expected error.- Returns:
- Returns a specific error expectation.
-
getErrorId
Gets the ID of the expected error shape.If present, it indicates the test should throw a matching error. Otherwise, the test should throw any error.
- Returns:
- The ID of the expected error shape.
-
toNode
Description copied from interface:ToNodeConverts a value to aNode. -
fromNode
-
equals
-
hashCode
public int hashCode()
-