package com.ecs.cicd; import software.amazon.awscdk.core.App; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import java.io.IOException; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; public class EcsWindowsCiCdBlueGreenTest { private final static ObjectMapper JSON = new ObjectMapper().configure(SerializationFeature.INDENT_OUTPUT, true); @Test public void testStack() throws IOException { App app = new App(); EcsWindowsBlueGreenStack stack = new EcsWindowsBlueGreenStack(app, "test"); // synthesize the stack to a CloudFormation template JsonNode actual = JSON.valueToTree(app.synth().getStackArtifact(stack.getArtifactId()).getTemplate()); // Update once resources have been added to the stack assertThat(actual.get("Resources")).isNotNull(); } }