summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src/test')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/ModelConverterTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/ModelConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/ModelConverterTest.java
index d820d9d748..72f6617e01 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/ModelConverterTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/ModelConverterTest.java
@@ -33,6 +33,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.junit.MockitoJUnitRunner;
+import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.Service;
@@ -41,6 +42,7 @@ import org.openecomp.sdc.be.model.jsontitan.datamodel.TopologyTemplate;
import org.openecomp.sdc.be.model.jsontitan.datamodel.NodeType;
import org.openecomp.sdc.be.model.jsontitan.datamodel.ToscaElementTypeEnum;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.assertTrue;
@RunWith(MockitoJUnitRunner.class)
public class ModelConverterTest {
@@ -82,4 +84,23 @@ public class ModelConverterTest {
Component component = test.convertFromToscaElement(topologyTemplate);
assertThat(component.getToscaType()).isEqualTo(ToscaElementTypeEnum.TOPOLOGY_TEMPLATE.getValue());
}
+
+ @Test
+ public void testIsAtomicComponent()
+ {
+ Resource component = new Resource();
+ component.setComponentType(ComponentTypeEnum.RESOURCE);
+ boolean result = test.isAtomicComponent(component);
+ assertTrue(result);
+ }
+
+ @Test
+ public void testGetVertexType()
+ {
+ VertexTypeEnum result;
+ Resource component = new Resource();
+ component.setComponentType(ComponentTypeEnum.RESOURCE);
+ result = test.getVertexType(component);
+ assertThat(result.getName()).isEqualTo("node_type");
+ }
}