software.amazon.awscdk.integtests.alpha.EqualsAssertion Maven / Gradle / Ivy
Show all versions of cdk-integ-tests-alpha Show documentation
package software.amazon.awscdk.integtests.alpha;
/**
* (experimental) Construct that creates a CustomResource to assert that two values are equal.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.integtests.alpha.*;
* ActualResult actualResult;
* ExpectedResult expectedResult;
* EqualsAssertion equalsAssertion = EqualsAssertion.Builder.create(this, "MyEqualsAssertion")
* .actual(actualResult)
* .expected(expectedResult)
* // the properties below are optional
* .failDeployment(false)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-11T15:56:07.769Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.integtests.alpha.$Module.class, fqn = "@aws-cdk/integ-tests-alpha.EqualsAssertion")
public class EqualsAssertion extends software.constructs.Construct {
protected EqualsAssertion(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected EqualsAssertion(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public EqualsAssertion(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.EqualsAssertionProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) The result of the assertion.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getResult() {
return software.amazon.jsii.Kernel.get(this, "result", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) A fluent builder for {@link software.amazon.awscdk.integtests.alpha.EqualsAssertion}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final software.amazon.awscdk.integtests.alpha.EqualsAssertionProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awscdk.integtests.alpha.EqualsAssertionProps.Builder();
}
/**
* (experimental) The actual results to compare.
*
* @return {@code this}
* @param actual The actual results to compare. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder actual(final software.amazon.awscdk.integtests.alpha.ActualResult actual) {
this.props.actual(actual);
return this;
}
/**
* (experimental) The expected result to assert.
*
* @return {@code this}
* @param expected The expected result to assert. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder expected(final software.amazon.awscdk.integtests.alpha.ExpectedResult expected) {
this.props.expected(expected);
return this;
}
/**
* (experimental) Set this to true if a failed assertion should result in a CloudFormation deployment failure.
*
* This is only necessary if assertions are being
* executed outside of integ-runner
.
*
* Default: false
*
* @return {@code this}
* @param failDeployment Set this to true if a failed assertion should result in a CloudFormation deployment failure. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder failDeployment(final java.lang.Boolean failDeployment) {
this.props.failDeployment(failDeployment);
return this;
}
/**
* @return a newly built instance of {@link software.amazon.awscdk.integtests.alpha.EqualsAssertion}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public software.amazon.awscdk.integtests.alpha.EqualsAssertion build() {
return new software.amazon.awscdk.integtests.alpha.EqualsAssertion(
this.scope,
this.id,
this.props.build()
);
}
}
}