diff options
author | ur326r <ur326r@att.com> | 2017-08-30 12:02:55 -0400 |
---|---|---|
committer | Venkata Harish K Kajur <vk250x@att.com> | 2017-08-31 09:47:49 -0400 |
commit | 061fec4860857e3eedf7c951813c178054e549b3 (patch) | |
tree | 60cad5fdc09a7f79e67535312faa3d797400c763 /aai-core/src/test | |
parent | 8dd94f5ef470840a9f58db22c38349914ff27d5f (diff) |
Check in vhnf modified bandwith code
Issue-ID: AAI-239
Change-Id: I9ab5b8651798a9db648e52edd8e1a720fdbaf703
Signed-off-by: ur326r <ur326r@att.com>
Diffstat (limited to 'aai-core/src/test')
-rw-r--r-- | aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java | 23 |
1 files changed, 12 insertions, 11 deletions
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)); - + } - - + } |