@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:39.694Z") @Stability(value=Experimental) public class IntegTest extends Construct
Each test case file should contain exactly one instance of this class.
Example:
public class StackUnderTestProps extends StackProps {
private Architecture architecture;
public Architecture getArchitecture() {
return this.architecture;
}
public StackUnderTestProps architecture(Architecture architecture) {
this.architecture = architecture;
return this;
}
}
public class StackUnderTest extends Stack {
public StackUnderTest(Construct scope, String id, StackUnderTestProps props) {
super(scope, id, props);
Function.Builder.create(this, "Handler")
.runtime(Runtime.NODEJS_12_X)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
.architecture(props.getArchitecture())
.build();
}
}
// Beginning of the test suite
App app = new App();
Stack stack = new Stack(app, "stack");
IntegTestCase differentArchsCase = IntegTestCase.Builder.create(stack, "DifferentArchitectures")
.stacks(List.of(
new StackUnderTest(app, "Stack1", new StackUnderTestProps()
.architecture(Architecture.ARM_64)
),
new StackUnderTest(app, "Stack2", new StackUnderTestProps()
.architecture(Architecture.X86_64)
)))
.build();
// There must be exactly one instance of TestCase per file
// There must be exactly one instance of TestCase per file
IntegTest.Builder.create(app, "integ-test")
// Register as many test cases as you want here
.testCases(List.of(differentArchsCase))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
IntegTest.Builder
(experimental) A fluent builder for
IntegTest. |
software.amazon.jsii.JsiiObject.InitializationModeIConstruct.Jsii$Default, IConstruct.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
IntegTest(Construct scope,
String id,
IntegTestProps props) |
protected |
IntegTest(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
IntegTest(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onPrepare()
(experimental) Perform final modifications before synthesis.
|
getNode, isConstruct, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected IntegTest(software.amazon.jsii.JsiiObjectRef objRef)
protected IntegTest(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public IntegTest(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
IntegTestProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) protected void onPrepare()
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
Copyright © 2022. All rights reserved.