aboutsummaryrefslogtreecommitdiffstats
path: root/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java')
-rw-r--r--aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java29
1 files changed, 23 insertions, 6 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java b/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java
index dd4454d5..511b2118 100644
--- a/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java
+++ b/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java
@@ -616,13 +616,30 @@ public class DbSerializerTest extends AAISetup {
public void getVertexPropertiesTest() throws AAIException, UnsupportedEncodingException {
engine.startTransaction();
- Vertex cr =
- engine.tx().addVertex("aai-node-type", "cloud-region", "cloud-owner", "me", "cloud-region-id", "123");
+ Vertex gvnf = engine.tx().addVertex("aai-node-type", "generic-vnf", "vnf-id", "myvnf", "aai-uri",
+ "/network/generic-vnfs/generic-vnf/myvnf",
+ AAIProperties.AAI_UUID, UUID.randomUUID().toString(),
+ AAIProperties.CREATED_TS, 123L,
+ AAIProperties.SOURCE_OF_TRUTH, "sot",
+ AAIProperties.RESOURCE_VERSION, "123",
+ AAIProperties.LAST_MOD_SOURCE_OF_TRUTH, "lmsot",
+ AAIProperties.LAST_MOD_TS, 333L);
+ Vertex vnfc = engine.tx().addVertex("aai-node-type", "vnfc", "vnfc-name", "a-name", "aai-uri",
+ "/network/vnfcs/vnfc/a-name",
+ AAIProperties.AAI_UUID, UUID.randomUUID().toString(),
+ AAIProperties.CREATED_TS, 123L,
+ AAIProperties.SOURCE_OF_TRUTH, "sot",
+ AAIProperties.RESOURCE_VERSION, "123",
+ AAIProperties.LAST_MOD_SOURCE_OF_TRUTH, "lmsot",
+ AAIProperties.LAST_MOD_TS, 333L);
+
+ edgeSer.addEdge(engine.tx().traversal(), gvnf, vnfc);
+
+ Introspector vnf = dbser.getVertexProperties(gvnf);
+ assertEquals("generic-vnf", vnf.getDbName());
+ assertEquals("myvnf", vnf.getValue("vnf-id"));
- Introspector crIntro = dbser.getVertexProperties(cr);
- assertEquals("cloud-region", crIntro.getDbName());
- assertEquals("me", crIntro.getValue("cloud-owner"));
- assertEquals("123", crIntro.getValue("cloud-region-id"));
+ assertFalse(vnf.marshal(false).contains("relationship-list"));
}