From 061fec4860857e3eedf7c951813c178054e549b3 Mon Sep 17 00:00:00 2001 From: ur326r Date: Wed, 30 Aug 2017 12:02:55 -0400 Subject: Check in vhnf modified bandwith code Issue-ID: AAI-239 Change-Id: I9ab5b8651798a9db648e52edd8e1a720fdbaf703 Signed-off-by: ur326r --- .../aai/serialization/db/DbAliasTest.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'aai-core/src/test/java') diff --git a/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java b/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java index c96450c2..cc419c67 100644 --- a/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java @@ -34,7 +34,6 @@ import java.util.Map; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Graph; -import org.apache.tinkerpop.gremlin.structure.T; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.After; import org.junit.Before; @@ -58,6 +57,9 @@ import com.thinkaurelius.titan.core.TitanGraph; @Ignore public class DbAliasTest { + + + private TitanGraph graph; private final Version version = Version.v9; private final ModelType introspectorFactoryType = ModelType.MOXY; @@ -76,13 +78,13 @@ public class DbAliasTest { type, loader); } - + @After public void tearDown() { graph.tx().rollback(); graph.close(); } - + @Test public void checkOnWrite() throws AAIException, UnsupportedEncodingException, URISyntaxException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException, NoSuchMethodException, InterruptedException { final String property = "persona-model-customization-id"; @@ -107,17 +109,17 @@ public class DbAliasTest { if (map.containsKey(PropertyMetadata.DB_ALIAS)) { dbPropertyName = map.get(PropertyMetadata.DB_ALIAS); } - + assertEquals("dbAlias is ", "model-customization-id", dbPropertyName); assertEquals("dbAlias property exists", "hello", v.property(dbPropertyName).orElse("")); assertEquals("model property does not", "missing", v.property(property).orElse("missing")); - + } - + @Test public void checkOnRead() throws AAIException, UnsupportedEncodingException, URISyntaxException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException, NoSuchMethodException, InterruptedException, MalformedURLException { final String property = "persona-model-customization-id"; - + TransactionalGraphEngine spy = spy(dbEngine); TransactionalGraphEngine.Admin adminSpy = spy(dbEngine.asAdmin()); Vertex v = graph.traversal().addV("vnf-id", "key1", "model-customization-id", "hello").next(); @@ -129,10 +131,9 @@ public class DbAliasTest { DBSerializer serializer = new DBSerializer(version, spy, introspectorFactoryType, "AAI_TEST"); Introspector obj = loader.introspectorFromName("generic-vnf"); serializer.dbToObject(Collections.singletonList(v), obj, 0, true, "false"); - + assertEquals("dbAlias property exists", "hello", obj.getValue(property)); - + } - - + } -- cgit 1.2.3-korg