summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src/test/java')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/ModelConverterTest.java12
1 files changed, 12 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 72f6617e01..f8713c6b78 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
@@ -35,6 +35,7 @@ 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.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.Service;
import org.openecomp.sdc.be.model.Component;
@@ -42,6 +43,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.assertSame;
import static org.junit.Assert.assertTrue;
@RunWith(MockitoJUnitRunner.class)
@@ -86,6 +88,16 @@ public class ModelConverterTest {
}
@Test
+ public void testConvertFromToscaElementResourceType()
+ {
+ TopologyTemplate topologyTemplate = new TopologyTemplate();
+ topologyTemplate.setComponentType(ComponentTypeEnum.RESOURCE);
+ topologyTemplate.setResourceType(ResourceTypeEnum.PNF);
+ Resource resource = test.convertFromToscaElement(topologyTemplate);
+ assertSame(ResourceTypeEnum.PNF, resource.getResourceType());
+ }
+
+ @Test
public void testIsAtomicComponent()
{
Resource component = new Resource();