@Internal public static final class IAwsApiCall.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IAwsApiCall.Jsii$Default
software.amazon.jsii.JsiiObject.InitializationModeIAwsApiCall.Jsii$Default, IAwsApiCall.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertAtPath(String path,
ExpectedResult expected)
(experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.
|
void |
expect(ExpectedResult expected)
(experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall.
|
Reference |
getAtt(String attributeName)
(experimental) Returns the value of an attribute of the custom resource of an arbitrary type.
|
String |
getAttString(String attributeName)
(experimental) Returns the value of an attribute of the custom resource of type string.
|
ConstructNode |
getNode()
(experimental) The construct tree node for this construct.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Experimental) @NotNull public final ConstructNode getNode()
getNode in interface IAwsApiCall.Jsii$Default@Stability(value=Experimental)
public final void assertAtPath(@NotNull
String path,
@NotNull
ExpectedResult expected)
For example the SQS.receiveMessage api response would look like:
If you wanted to assert the value of Body you could do
Example:
IntegTest integ;
Map<String, Map<String, Object>[]> actual = Map.of(
"Messages", List.of(Map.of(
"MessageId", "",
"ReceiptHandle", "",
"MD5OfBody", "",
"Body", "hello",
"Attributes", Map.of(),
"MD5OfMessageAttributes", Map.of(),
"MessageAttributes", Map.of())));
IAwsApiCall message = integ.assertions.awsApiCall("SQS", "receiveMessage");
message.assertAtPath("Messages.0.Body", ExpectedResult.stringLikeRegexp("hello"));
assertAtPath in interface IAwsApiCallassertAtPath in interface IAwsApiCall.Jsii$Defaultpath - This parameter is required.expected - This parameter is required.@Stability(value=Experimental)
public final void expect(@NotNull
ExpectedResult expected)
Example:
IntegTest integ;
IAwsApiCall invoke = integ.assertions.invokeFunction(LambdaInvokeFunctionProps.builder()
.functionName("my-func")
.build());
invoke.expect(ExpectedResult.objectLike(Map.of("Payload", "OK")));
expect in interface IAwsApiCallexpect in interface IAwsApiCall.Jsii$Defaultexpected - This parameter is required.@Stability(value=Experimental) @NotNull public final Reference getAtt(@NotNull String attributeName)
Attributes are returned from the custom resource provider through the
Data map where the key is the attribute name.
getAtt in interface IAwsApiCallgetAtt in interface IAwsApiCall.Jsii$DefaultattributeName - the name of the attribute. This parameter is required.@Stability(value=Experimental) @NotNull public final String getAttString(@NotNull String attributeName)
Attributes are returned from the custom resource provider through the
Data map where the key is the attribute name.
getAttString in interface IAwsApiCallgetAttString in interface IAwsApiCall.Jsii$DefaultattributeName - the name of the attribute. This parameter is required.Copyright © 2022. All rights reserved.