Class MatchResult
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.assertions.MatchResult
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:55.906Z")
@Stability(Stable)
public class MatchResult
extends software.amazon.jsii.JsiiObject
The result of
Match.test()
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.assertions.*; Object target; MatchResult matchResult = new MatchResult(target);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionMatchResult
(Object target) protected
MatchResult
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
MatchResult
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptioncompose
(String id, MatchResult inner) Compose the results of a previous match as a subtree.finished()
Prepare the result to be analyzed.The cost of the failures so far.The number of failures.Whether the match is a success.The target for which this result was generated.Does the result contain any failures.Deprecated.use recordFailure()void
recordCapture
(MatchCapture options) Record a capture against in this match result.recordFailure
(MatchFailure failure) Record a new failure into this result at a specific path.Do a deep render of the match result, showing the structure mismatches in context.Render the failed match in a presentable way.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
MatchResult
protected MatchResult(software.amazon.jsii.JsiiObjectRef objRef) -
MatchResult
protected MatchResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
MatchResult
- Parameters:
target
- This parameter is required.
-
-
Method Details
-
compose
@Stability(Stable) @NotNull public MatchResult compose(@NotNull String id, @NotNull MatchResult inner) Compose the results of a previous match as a subtree.- Parameters:
id
- the id of the parent tree. This parameter is required.inner
- This parameter is required.
-
finished
Prepare the result to be analyzed.This API must be called prior to analyzing these results.
-
hasFailed
Does the result contain any failures.If not, the result is a success
-
push
@Stability(Deprecated) @Deprecated @NotNull public MatchResult push(@NotNull Matcher matcher, @NotNull List<String> path, @NotNull String message) Deprecated.use recordFailure()(deprecated) DEPRECATED.- Parameters:
matcher
- This parameter is required.path
- This parameter is required.message
- This parameter is required.
-
recordCapture
Record a capture against in this match result.- Parameters:
options
- This parameter is required.
-
recordFailure
Record a new failure into this result at a specific path.- Parameters:
failure
- This parameter is required.
-
renderMismatch
Do a deep render of the match result, showing the structure mismatches in context. -
toHumanStrings
Render the failed match in a presentable way.Prefer using
renderMismatch
over this method. It is left for backwards compatibility for test suites that expect it, butrenderMismatch()
will produce better output. -
getFailCost
The cost of the failures so far. -
getFailCount
The number of failures. -
getIsSuccess
Whether the match is a success. -
getTarget
The target for which this result was generated.
-