Skip to main content
Testing utilities for cdktf applications.

Initializers

using Io.Cdktn;

new Testing();
NameTypeDescription

Static Functions

NameDescription
AppReturns an app for testing with the following properties: - Output directory is a temp dir.
EnableFutureFlagsNo description.
FakeCdktfJsonPathNo description.
FullSynthNo description.
RenderConstructTreeNo description.
SetupJestNo description.
StubVersionNo description.
SynthReturns the Terraform synthesized JSON.
SynthHclReturns the Terraform synthesized JSON.
SynthScopeNo description.
ToBeValidTerraformNo description.
ToHaveDataSourceNo description.
ToHaveDataSourceWithPropertiesNo description.
ToHaveProviderNo description.
ToHaveProviderWithPropertiesNo description.
ToHaveResourceNo description.
ToHaveResourceWithPropertiesNo description.

App

using Io.Cdktn;

Testing.App(TestingAppConfig Options = null);
Returns an app for testing with the following properties: - Output directory is a temp dir.

OptionsOptional


EnableFutureFlags

using Io.Cdktn;

Testing.EnableFutureFlags(App App);

AppRequired


FakeCdktfJsonPath

using Io.Cdktn;

Testing.FakeCdktfJsonPath(App App);

AppRequired


FullSynth

using Io.Cdktn;

Testing.FullSynth(TerraformStack Stack);

StackRequired


RenderConstructTree

using Io.Cdktn;

Testing.RenderConstructTree(IConstruct Construct);

ConstructRequired

  • Type: Constructs.IConstruct

SetupJest

using Io.Cdktn;

Testing.SetupJest();

StubVersion

using Io.Cdktn;

Testing.StubVersion(App App);

AppRequired


Synth

using Io.Cdktn;

Testing.Synth(TerraformStack Stack, bool RunValidations = null);
Returns the Terraform synthesized JSON.

StackRequired


RunValidationsOptional

  • Type: bool

SynthHcl

using Io.Cdktn;

Testing.SynthHcl(TerraformStack Stack, bool RunValidations = null, bool ReturnMetadata = null);
Returns the Terraform synthesized JSON.

StackRequired


RunValidationsOptional

  • Type: bool

ReturnMetadataOptional

  • Type: bool

SynthScope

using Io.Cdktn;

Testing.SynthScope(IScopeCallback Fn);

FnRequired


ToBeValidTerraform

using Io.Cdktn;

Testing.ToBeValidTerraform(string Received);

ReceivedRequired

  • Type: string

ToHaveDataSource

using Io.Cdktn;

Testing.ToHaveDataSource(string Received, string ResourceType);

ReceivedRequired

  • Type: string

ResourceTypeRequired

  • Type: string

ToHaveDataSourceWithProperties

using Io.Cdktn;

Testing.ToHaveDataSourceWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary<string, object> Properties = null);

ReceivedRequired

  • Type: string

ResourceTypeRequired

  • Type: string

PropertiesOptional

  • Type: System.Collections.Generic.IDictionary< string, object >

ToHaveProvider

using Io.Cdktn;

Testing.ToHaveProvider(string Received, string ResourceType);

ReceivedRequired

  • Type: string

ResourceTypeRequired

  • Type: string

ToHaveProviderWithProperties

using Io.Cdktn;

Testing.ToHaveProviderWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary<string, object> Properties = null);

ReceivedRequired

  • Type: string

ResourceTypeRequired

  • Type: string

PropertiesOptional

  • Type: System.Collections.Generic.IDictionary< string, object >

ToHaveResource

using Io.Cdktn;

Testing.ToHaveResource(string Received, string ResourceType);

ReceivedRequired

  • Type: string

ResourceTypeRequired

  • Type: string

ToHaveResourceWithProperties

using Io.Cdktn;

Testing.ToHaveResourceWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary<string, object> Properties = null);

ReceivedRequired

  • Type: string

ResourceTypeRequired

  • Type: string

PropertiesOptional

  • Type: System.Collections.Generic.IDictionary< string, object >