fix test getServiceModelALaCarteInstantiation 94/93094/1
authorEylon Malin <eylon.malin@intl.att.com>
Thu, 8 Aug 2019 14:41:01 +0000 (17:41 +0300)
committerEylon Malin <eylon.malin@intl.att.com>
Thu, 8 Aug 2019 14:41:01 +0000 (17:41 +0300)
Issue-ID: VID-378
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Change-Id: I0d98886837cc67164b77f3407323ac45e3e126a4

vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java

index 3292918..8201bcf 100644 (file)
@@ -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<String> 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"));
     }