aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2018-09-07 10:53:31 +0200
committerromaingimbert <romain.gimbert@orange.com>2018-09-07 10:53:31 +0200
commitbeb712f922ca903674844c3370424fc14330164e (patch)
tree909e0969e0940d8e8121e3cc7c3bc610c4183d2b /src/test/java/org
parent2ede3ffbcb422795d0d3a733dbe60228ad0ace0d (diff)
state attribute for ServiceInventory
-change jolt mapping to add field state -manage when no VNF found -add test Change-Id: I68d885678aab031176a130349b2fb73838fff683 Issue-ID: EXTAPI-134 Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/onap/nbi/apis/ApiTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/java/org/onap/nbi/apis/ApiTest.java b/src/test/java/org/onap/nbi/apis/ApiTest.java
index ad4a956..4d24062 100644
--- a/src/test/java/org/onap/nbi/apis/ApiTest.java
+++ b/src/test/java/org/onap/nbi/apis/ApiTest.java
@@ -24,6 +24,7 @@ import com.github.tomakehurst.wiremock.stubbing.ListStubMappingsResult;
import com.github.tomakehurst.wiremock.stubbing.StubMapping;
import java.util.ArrayList;
import java.util.Date;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Set;
import javax.validation.Validation;
@@ -208,6 +209,21 @@ public class ApiTest {
}
@Test
+ public void testServiceResourceGetInventoryWithStatus() throws Exception {
+
+ String serviceName = "AnsibleService";
+ String serviceId = "405c8c00-44b9-4303-9f27-6797d22ca096";
+ MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ params.add("serviceSpecification.name", serviceName);
+ params.add("relatedParty.id", "6490");
+ ResponseEntity<Object> resource = serviceInventoryResource.getServiceInventory(serviceId, params);
+ LinkedHashMap service = (LinkedHashMap) resource.getBody();
+ assertThat(service.get("state")).isEqualTo("Active");
+
+
+ }
+
+ @Test
public void testServiceResourceGetInventoryWithoutRelationShipList() throws Exception {
String serviceName = "vFW";