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 boolean
equals(java.lang.Object o)
static Expectation
failure(FailureExpectation failure)
static Expectation
fromNode(Node node)
Creates aExpectation
from aNode
.java.util.Optional<FailureExpectation>
getFailure()
int
hashCode()
boolean
isFailure()
boolean
isSuccess()
static Expectation
success()
Node
toNode()
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 aExpectation
from 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-