diff options
Diffstat (limited to 'aai-traversal/src/test/java/org/onap/aai/rest/search/RelatedToTreeCustomQueryTest.java')
-rw-r--r-- | aai-traversal/src/test/java/org/onap/aai/rest/search/RelatedToTreeCustomQueryTest.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/search/RelatedToTreeCustomQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/RelatedToTreeCustomQueryTest.java index 2f31206..f47c9c0 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/search/RelatedToTreeCustomQueryTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/RelatedToTreeCustomQueryTest.java @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,9 @@ * ============LICENSE_END========================================================= */ package org.onap.aai.rest.search; + +import java.util.Map; + import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.T; @@ -26,8 +29,6 @@ import org.junit.Test; import org.onap.aai.exceptions.AAIException; import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException; -import java.util.Map; - public class RelatedToTreeCustomQueryTest extends QueryTest { public RelatedToTreeCustomQueryTest() throws AAIException, NoEdgeRuleFoundException { @@ -38,14 +39,20 @@ public class RelatedToTreeCustomQueryTest extends QueryTest { public void run() { super.run(); } + @Override protected void createGraph() throws AAIException, NoEdgeRuleFoundException { - Vertex genericvnf1 = graph.addVertex(T.label, "generic-vnf", T.id, "1", "aai-node-type", "generic-vnf", "vnf-id", "genvnf1", "vnf-name", "genvnfname1", "nf-type", "sample-nf-type"); + Vertex genericvnf1 = + graph.addVertex(T.label, "generic-vnf", T.id, "1", "aai-node-type", "generic-vnf", + "vnf-id", "genvnf1", "vnf-name", "genvnfname1", "nf-type", "sample-nf-type"); - Vertex entitlement1 = graph.addVertex(T.label, "entitlement", T.id, "2", "aai-node-type", "entitlement", "group-uuid", "entitlementid01", "resource-uuid", "rentitlementid01"); - Vertex entitlement2 = graph.addVertex(T.label, "entitlement", T.id, "3", "aai-node-type", "entitlement", "group-uuid", "entitlementid02", "resource-uuid", "rentitlementid02"); - Vertex entitlement3 = graph.addVertex(T.label, "entitlement", T.id, "4", "aai-node-type", "entitlement", "group-uuid", "entitlementid03", "resource-uuid", "rentitlementid03"); + Vertex entitlement1 = graph.addVertex(T.label, "entitlement", T.id, "2", "aai-node-type", + "entitlement", "group-uuid", "entitlementid01", "resource-uuid", "rentitlementid01"); + Vertex entitlement2 = graph.addVertex(T.label, "entitlement", T.id, "3", "aai-node-type", + "entitlement", "group-uuid", "entitlementid02", "resource-uuid", "rentitlementid02"); + Vertex entitlement3 = graph.addVertex(T.label, "entitlement", T.id, "4", "aai-node-type", + "entitlement", "group-uuid", "entitlementid03", "resource-uuid", "rentitlementid03"); GraphTraversalSource g = graph.traversal(); rules.addTreeEdge(g, genericvnf1, entitlement1); |