diff --git a/pom.xml b/pom.xml index e9a78d17..396458d0 100644 --- a/pom.xml +++ b/pom.xml @@ -189,6 +189,12 @@ + + net.javacrumbs.json-unit + json-unit-assertj + 2.4.0 + test + org.apache.maven maven-plugin-api diff --git a/src/test/java/com/lazerycode/jmeter/json/TestConfigTest.java b/src/test/java/com/lazerycode/jmeter/json/TestConfigTest.java index 5d2dbfa3..abdaa051 100644 --- a/src/test/java/com/lazerycode/jmeter/json/TestConfigTest.java +++ b/src/test/java/com/lazerycode/jmeter/json/TestConfigTest.java @@ -13,6 +13,7 @@ import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; +import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; public class TestConfigTest { @@ -24,7 +25,7 @@ public void createConfigFromResourceFile() throws MojoExecutionException, URISyn URL configFile = this.getClass().getResource(testConfigFile); File testConfigJSON = new File(configFile.toURI()); TestConfigurationWrapper testConfig = new TestConfigurationWrapper(testConfigJSON, "test-execution"); - assertThat(testConfig.getFullConfig()) + assertThatJson(testConfig.getFullConfig()) .isEqualTo("{\"executionID\":\"test-execution\",\"jmeterDirectoryPath\":null,\"runtimeJarName\":null,\"resultsOutputIsCSVFormat\":false,\"generateReports\":false,\"resultFilesLocations\":[],\"propertiesMap\":null,\"jmeterWorkingDirectoryPath\":null}"); }