summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/GraphVertexTest.java
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-10-19 19:50:28 +0300
committerYuli Shlosberg <ys9693@att.com>2017-10-22 12:48:50 +0000
commit287481cb94f4ba0b72a520fba1e05daea95ba431 (patch)
treed21617eddc4f35865001b48b91e2244a36f7d897 /catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/GraphVertexTest.java
parentf844f32d94d7fe96fb7fdaa431c7cfb009838075 (diff)
add more unit tests to BE components
Change-Id: I23a72857d669f03e8cb7e543c006fed3318670b0 Issue-Id: SDC-467 Signed-off-by: Yuli Shlosberg <ys9693@att.com> (cherry picked from commit 6dc570c66839fe239b63f1aa8da489c520fb215d)
Diffstat (limited to 'catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/GraphVertexTest.java')
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/GraphVertexTest.java204
1 files changed, 204 insertions, 0 deletions
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/GraphVertexTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/GraphVertexTest.java
new file mode 100644
index 0000000000..9a8b67dbd0
--- /dev/null
+++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/GraphVertexTest.java
@@ -0,0 +1,204 @@
+package org.openecomp.sdc.be.dao.jsongraph;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+
+import com.thinkaurelius.titan.core.TitanVertex;
+
+
+public class GraphVertexTest {
+
+ private GraphVertex createTestSubject() {
+ return new GraphVertex();
+ }
+
+
+ @Test
+ public void testGetUniqueId() throws Exception {
+ GraphVertex testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getUniqueId();
+ }
+
+
+ @Test
+ public void testSetUniqueId() throws Exception {
+ GraphVertex testSubject;
+ String uniqueId = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setUniqueId(uniqueId);
+ }
+
+
+ @Test
+ public void testGetJson() throws Exception {
+ GraphVertex testSubject;
+ Map<String, ? extends ToscaDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getJson();
+ }
+
+
+ @Test
+ public void testSetJson() throws Exception {
+ GraphVertex testSubject;
+ Map<String, ? extends ToscaDataDefinition> json = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setJson(json);
+ }
+
+
+ @Test
+ public void testGetVertex() throws Exception {
+ GraphVertex testSubject;
+ TitanVertex result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getVertex();
+ }
+
+
+ @Test
+ public void testSetVertex() throws Exception {
+ GraphVertex testSubject;
+ TitanVertex vertex = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setVertex(vertex);
+ }
+
+
+ @Test
+ public void testGetLabel() throws Exception {
+ GraphVertex testSubject;
+ VertexTypeEnum result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getLabel();
+ }
+
+
+ @Test
+ public void testSetLabel() throws Exception {
+ GraphVertex testSubject;
+ VertexTypeEnum label = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setLabel(label);
+ }
+
+
+
+ @Test
+ public void testAddMetadataProperty() throws Exception {
+ GraphVertex testSubject;
+ GraphPropertyEnum propName = null;
+ Object propValue = null;
+
+ // test 1
+ testSubject = createTestSubject();
+ propValue = null;
+ testSubject.addMetadataProperty(propName, propValue);
+ }
+
+
+ @Test
+ public void testGetMetadataProperty() throws Exception {
+ GraphVertex testSubject;
+ GraphPropertyEnum metadataProperty = null;
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMetadataProperty(metadataProperty);
+ }
+
+
+ @Test
+ public void testGetMetadataProperties() throws Exception {
+ GraphVertex testSubject;
+ Map<GraphPropertyEnum, Object> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMetadataProperties();
+ }
+
+
+ @Test
+ public void testSetMetadataProperties() throws Exception {
+ GraphVertex testSubject;
+ Map<GraphPropertyEnum, Object> metadataProperties = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setMetadataProperties(metadataProperties);
+ }
+
+
+ @Test
+ public void testGetMetadataJson() throws Exception {
+ GraphVertex testSubject;
+ Map<String, Object> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMetadataJson();
+ }
+
+
+ @Test
+ public void testSetMetadataJson() throws Exception {
+ GraphVertex testSubject;
+ Map<String, Object> metadataJson = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setMetadataJson(metadataJson);
+ }
+
+
+
+
+ @Test
+ public void testGetJsonMetadataField() throws Exception {
+ GraphVertex testSubject;
+ JsonPresentationFields field = null;
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getJsonMetadataField(field);
+ }
+
+
+ @Test
+ public void testUpdateMetadataJsonWithCurrentMetadataProperties() throws Exception {
+ GraphVertex testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.updateMetadataJsonWithCurrentMetadataProperties();
+ }
+} \ No newline at end of file