Skip to content

Commit

Permalink
revise resourceoverrides test
Browse files Browse the repository at this point in the history
  • Loading branch information
NGL321 committed Jan 2, 2020
1 parent 3109090 commit 76f6c2e
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;

import org.junit.Before;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.skyscreamer.jsonassert.JSONCompareMode;
Expand All @@ -15,14 +17,20 @@
public class ResourceOverridesStackTest {
private static final ObjectMapper JSON = new ObjectMapper();

@Test
public void shouldGenerateValidCloudFormationTemplate() throws Exception {
private String actual;
private String expected;

@Before
public void setUp() throws IOException {
App app = new App();
Stack stack = new ResourceOverridesStack(app, "resource-overrides");
actual = getStackTemplateJson(new ResourceOverridesStack(app, "resource-overrides"))
.toString();

String actual = getStackTemplateJson(stack).toString();
String expected = readJsonFromResource("testResourceOverrides.expected.json").toString();
expected = readJsonFromResource("testResourceOverrides.expected.json").toString();
}

@Test
public void shouldGenerateValidCloudFormationTemplate() throws Exception {
JSONAssert.assertEquals(expected, actual, JSONCompareMode.LENIENT);
}

Expand Down

0 comments on commit 76f6c2e

Please sign in to comment.