Class TestExpectation
java.lang.Object
software.amazon.smithy.protocoltests.traits.TestExpectation
- All Implemented Interfaces:
ToNode
Defines the expected result of a test case.
This can either be a successful response, any error response, or a specific error response.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TestExpectationfailure(TestFailureExpectation failure) static TestExpectationCreates aTestExpectationfrom aNode.inthashCode()booleanbooleanstatic TestExpectationsuccess()toNode()Converts a value to aNode.
-
Method Details
-
success
- Returns:
- Creates an expectation that the service call for a smoke test case is successful.
-
failure
- Parameters:
failure- The failure to expect.- Returns:
- Creates an expectation that the service call for a smoke test case will result in the given failure.
-
fromNode
Creates aTestExpectationfrom aNode.- Parameters:
node- Node to deserialize into aTestExpectation.- Returns:
- Returns the created
TestExpectation.
-
isSuccess
public boolean isSuccess()- Returns:
- Whether the service call is expected to succeed.
-
isFailure
public boolean isFailure()- Returns:
- Whether the service call is expected to fail.
-
getFailure
- Returns:
- The expected failure, if this expectation is a failure expectation.
-
toNode
Description copied from interface:ToNodeConverts a value to aNode. -
equals
-
hashCode
public int hashCode()
-