@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:58.385Z") @Stability(value=Experimental) public abstract class ExpectedResult extends software.amazon.jsii.JsiiObject
Example:
App app;
IntegTest integ;
integ.assertions.awsApiCall("SQS", "sendMessage", Map.of(
"QueueUrl", "url",
"MessageBody", "hello"));
IAwsApiCall message = integ.assertions.awsApiCall("SQS", "receiveMessage", Map.of(
"QueueUrl", "url"));
message.expect(ExpectedResult.objectLike(Map.of(
"Messages", List.of(Map.of("Body", "hello")))));
| Modifier | Constructor and Description |
|---|---|
protected |
ExpectedResult() |
protected |
ExpectedResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ExpectedResult(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static ExpectedResult |
arrayWith(List<? extends Object> expected)
(experimental) The actual results must be a list and must contain an item with the expected results.
|
static ExpectedResult |
exact(Object expected)
(experimental) The actual results must match exactly.
|
abstract String |
getResult()
(experimental) The expected results encoded as a string.
|
static ExpectedResult |
objectLike(Map<String,? extends Object> expected)
(experimental) The expected results must be a subset of the actual results.
|
abstract void |
setResult(String value)
(experimental) The expected results encoded as a string.
|
static ExpectedResult |
stringLikeRegexp(String expected)
(experimental) Actual results is a string that matches the Expected result regex.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected ExpectedResult(software.amazon.jsii.JsiiObjectRef objRef)
protected ExpectedResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) protected ExpectedResult()
@Stability(value=Experimental) @NotNull public static ExpectedResult arrayWith(@NotNull List<? extends Object> expected)
Example:
// actual results
Map<String, String>[] actual = List.of(Map.of(
"stringParam", "hello"), Map.of(
"stringParam", "world"));
// pass
ExpectedResult.arrayWith(List.of(Map.of(
"stringParam", "hello")));
expected - This parameter is required.@Stability(value=Experimental) @NotNull public static ExpectedResult exact(@NotNull Object expected)
Missing data will result in a failure
Example:
// actual results
Map<String, Object> actual = Map.of(
"stringParam", "hello",
"numberParam", 3,
"booleanParam", true);
// pass
ExpectedResult.exact(Map.of(
"stringParam", "hello",
"numberParam", 3,
"booleanParam", true));
// fail
ExpectedResult.exact(Map.of(
"stringParam", "hello"));
expected - This parameter is required.@Stability(value=Experimental) @NotNull public static ExpectedResult objectLike(@NotNull Map<String,? extends Object> expected)
Example:
// actual results
Map<String, Object> actual = Map.of(
"stringParam", "hello",
"numberParam", 3,
"booleanParam", true);
// pass
ExpectedResult.objectLike(Map.of(
"stringParam", "hello"));
expected - This parameter is required.@Stability(value=Experimental) @NotNull public static ExpectedResult stringLikeRegexp(@NotNull String expected)
Example:
// actual results
String actual = "some string value";
// pass
ExpectedResult.stringLikeRegexp("value");
expected - This parameter is required.@Stability(value=Experimental) @NotNull public abstract String getResult()
@Stability(value=Experimental)
public abstract void setResult(@NotNull
String value)
Copyright © 2022. All rights reserved.