Class ExpectedResult
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.integtests.alpha.ExpectedResult
- All Implemented Interfaces:
- software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
           date="2025-10-29T11:15:51.022Z")
@Stability(Experimental)
public abstract class ExpectedResult
extends software.amazon.jsii.JsiiObject
(experimental) Represents the "expected" results to compare.
 
Example:
 App app;
 Stack stack;
 IStateMachine sm;
 IntegTest testCase = IntegTest.Builder.create(app, "IntegTest")
         .testCases(List.of(stack))
         .build();
 // Start an execution
 IApiCall start = testCase.assertions.awsApiCall("StepFunctions", "startExecution", Map.of(
         "stateMachineArn", sm.getStateMachineArn()));
 // describe the results of the execution
 IApiCall describe = testCase.assertions.awsApiCall("StepFunctions", "describeExecution", Map.of(
         "executionArn", start.getAttString("executionArn")));
 // assert the results
 describe.expect(ExpectedResult.objectLike(Map.of(
         "status", "SUCCEEDED")));
 - 
Nested Class SummaryNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationMode
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedprotectedExpectedResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedExpectedResult(software.amazon.jsii.JsiiObjectRef objRef) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic ExpectedResult(experimental) The actual results must be a list and must contain an item with the expected results.static ExpectedResult(experimental) The actual results must match exactly.abstract String(experimental) The expected results encoded as a string.static ExpectedResultobjectLike(Map<String, ? extends Object> expected) (experimental) The expected results must be a subset of the actual results.abstract void(experimental) The expected results encoded as a string.static ExpectedResultstringLikeRegexp(String expected) (experimental) Actual results is a string that matches the Expected result regex.Methods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Constructor Details- 
ExpectedResultprotected ExpectedResult(software.amazon.jsii.JsiiObjectRef objRef) 
- 
ExpectedResultprotected ExpectedResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
ExpectedResult@Stability(Experimental) protected ExpectedResult()
 
- 
- 
Method Details- 
arrayWith@Stability(Experimental) @NotNull public static ExpectedResult arrayWith(@NotNull List<? extends Object> expected) (experimental) The actual results must be a list and must contain an item with the expected results.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")));- Parameters:
- expected- This parameter is required.
- See Also:
 
- 
exact(experimental) The actual results must match exactly.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"));- Parameters:
- expected- This parameter is required.
- See Also:
 
- 
objectLike@Stability(Experimental) @NotNull public static ExpectedResult objectLike(@NotNull Map<String, ? extends Object> expected) (experimental) The expected results must be a subset of the actual results.Example: // actual results Map<String, Object> actual = Map.of( "stringParam", "hello", "numberParam", 3, "booleanParam", true, "objectParam", Map.of("prop1", "value", "prop2", "value")); // pass ExpectedResult.objectLike(Map.of( "stringParam", "hello", "objectParam", Map.of("prop1", "value")));- Parameters:
- expected- This parameter is required.
- See Also:
 
- 
stringLikeRegexp@Stability(Experimental) @NotNull public static ExpectedResult stringLikeRegexp(@NotNull String expected) (experimental) Actual results is a string that matches the Expected result regex.Example: // actual results String actual = "some string value"; // pass ExpectedResult.stringLikeRegexp("value");- Parameters:
- expected- This parameter is required.
- See Also:
 
- 
getResult(experimental) The expected results encoded as a string.
- 
setResult(experimental) The expected results encoded as a string.
 
-