Class Expectation
- java.lang.Object
-
- software.amazon.smithy.smoketests.traits.Expectation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static Expectationfailure(FailureExpectation failure)static ExpectationfromNode(Node node)Creates aExpectationfrom aNode.java.util.Optional<FailureExpectation>getFailure()inthashCode()booleanisFailure()booleanisSuccess()static Expectationsuccess()NodetoNode()Converts a value to aNode.
-
-
-
Method Detail
-
success
public static Expectation success()
- Returns:
- Creates an expectation that the service call for a smoke test case is successful.
-
failure
public static Expectation failure(FailureExpectation 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
public static Expectation fromNode(Node node)
Creates aExpectationfrom aNode.- Parameters:
node- Node to deserialize into aExpectation.- Returns:
- Returns the created
Expectation.
-
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
public java.util.Optional<FailureExpectation> getFailure()
- Returns:
- The expected failure, if this expectation is a failure expectation.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-