From ad706d09442b1b1b6d2d8cff4042867ceea6b56f Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Thu, 8 Aug 2019 17:41:01 +0300 Subject: fix test getServiceModelALaCarteInstantiation Issue-ID: VID-378 Signed-off-by: Eylon Malin Change-Id: I0d98886837cc67164b77f3407323ac45e3e126a4 --- vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vid-automation/src/test/java') diff --git a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java index 329291838..8201bcfa0 100644 --- a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java +++ b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java @@ -14,7 +14,9 @@ import org.testng.annotations.Test; import vid.automation.test.infra.FeatureTogglingTest; import vid.automation.test.infra.Features; +import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.JsonMatchers.jsonStringEquals; +import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNot.not; @@ -79,7 +81,9 @@ public class SdcApiTest extends BaseApiTest { ResponseEntity response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + A_LA_CARTE_INSTANTIATION_TYPE_UUID), String.class); Assert.assertEquals(response.getStatusCode(), HttpStatus.OK); String aLaCarteInstantiationTypeExpectedResponse = loadResourceAsString(A_LA_CARTE_INSTANTIATION_TYPE_EXPECTED_RESPONSE); - assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(turnOffInstantiationUI(aLaCarteInstantiationTypeExpectedResponse)))); + assertThat(response.getBody(), jsonEquals(aLaCarteInstantiationTypeExpectedResponse) + .when(IGNORING_ARRAY_ORDER) + .whenIgnoringPaths("service.vidNotions.instantiationUI")); } -- cgit 1.2.3-korg