@Generated(value="jsii-pacmak/1.46.0 (build cd08c55)", date="2021-11-25T20:11:04.683Z") @Stability(value=Experimental) public class MatchResult extends software.amazon.jsii.JsiiObject
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);
| Modifier | Constructor and Description |
|---|---|
protected |
MatchResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
MatchResult(software.amazon.jsii.JsiiObjectRef objRef) |
|
MatchResult(Object target) |
| Modifier and Type | Method and Description |
|---|---|
MatchResult |
compose(String id,
MatchResult inner)
(experimental) Compose the results of a previous match as a subtree.
|
Number |
getFailCount()
(experimental) The number of failures.
|
Object |
getTarget()
(experimental) The target for which this result was generated.
|
Boolean |
hasFailed()
(experimental) Does the result contain any failures.
|
MatchResult |
push(Matcher matcher,
List<String> path,
String message)
(experimental) Push a new failure into this result at a specific path.
|
List<String> |
toHumanStrings()
(experimental) Get the list of failures as human readable strings.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected MatchResult(software.amazon.jsii.JsiiObjectRef objRef)
protected MatchResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public MatchResult(@NotNull
Object target)
target - This parameter is required.@Stability(value=Experimental) @NotNull public MatchResult compose(@NotNull String id, @NotNull MatchResult inner)
id - the id of the parent tree. This parameter is required.inner - This parameter is required.@Stability(value=Experimental) @NotNull public Boolean hasFailed()
If not, the result is a success
@Stability(value=Experimental) @NotNull public MatchResult push(@NotNull Matcher matcher, @NotNull List<String> path, @NotNull String message)
If the failure occurred at root of the match tree, set the path to an empty list.
If it occurs in the 5th index of an array nested within the 'foo' key of an object,
set the path as ['/foo', '[5]'].
matcher - This parameter is required.path - the path at which the failure occurred. This parameter is required.message - the failure. This parameter is required.@Stability(value=Experimental) @NotNull public List<String> toHumanStrings()
@Stability(value=Experimental) @NotNull public Number getFailCount()
@Stability(value=Experimental) @NotNull public Object getTarget()
Copyright © 2021. All rights reserved.