@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:58.394Z") @Stability(value=Experimental) public interface IDeployAssert extends software.amazon.jsii.JsiiSerializable
This is only necessary when writing integration tests.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IDeployAssert.Jsii$Default
Internal default implementation for
IDeployAssert. |
static class |
IDeployAssert.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
| Modifier and Type | Method and Description |
|---|---|
IAwsApiCall |
awsApiCall(String service,
String api)
(experimental) Query AWS using JavaScript SDK V2 API calls.
|
IAwsApiCall |
awsApiCall(String service,
String api,
Object parameters)
(experimental) Query AWS using JavaScript SDK V2 API calls.
|
void |
expect(String id,
ExpectedResult expected,
ActualResult actual)
(experimental) Assert that the ExpectedResult is equal to the ActualResult.
|
IAwsApiCall |
invokeFunction(LambdaInvokeFunctionProps props)
(experimental) Invoke a lambda function and return the response which can be asserted.
|
@Stability(value=Experimental) @NotNull IAwsApiCall awsApiCall(@NotNull String service, @NotNull String api, @Nullable Object parameters)
This can be used to either trigger an action or to return a result that can then be asserted against an expected value
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")))));
service - This parameter is required.api - This parameter is required.parameters - @Stability(value=Experimental) @NotNull IAwsApiCall awsApiCall(@NotNull String service, @NotNull String api)
This can be used to either trigger an action or to return a result that can then be asserted against an expected value
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")))));
service - This parameter is required.api - This parameter is required.@Stability(value=Experimental)
void expect(@NotNull
String id,
@NotNull
ExpectedResult expected,
@NotNull
ActualResult actual)
Example:
IntegTest integ;
AwsApiCall apiCall;
integ.assertions.expect("invoke", ExpectedResult.objectLike(Map.of("Payload", "OK")), ActualResult.fromAwsApiCall(apiCall, "Body"));
id - This parameter is required.expected - This parameter is required.actual - This parameter is required.@Stability(value=Experimental) @NotNull IAwsApiCall invokeFunction(@NotNull LambdaInvokeFunctionProps props)
Example:
App app;
IntegTest integ;
IAwsApiCall invoke = integ.assertions.invokeFunction(LambdaInvokeFunctionProps.builder()
.functionName("my-function")
.build());
invoke.expect(ExpectedResult.objectLike(Map.of(
"Payload", "200")));
props - This parameter is required.Copyright © 2022. All rights reserved.