summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test
diff options
context:
space:
mode:
authorsiddharth0905 <siddharth.singh4@amdocs.com>2019-01-21 12:02:57 +0530
committersiddharth0905 <siddharth.singh4@amdocs.com>2019-01-21 14:25:45 +0530
commit7d8c592bdd302fe59fe12b134af941c2dd6ab058 (patch)
tree93e7edc52de79df21a2f327db23778f9fa012403 /catalog-model/src/test
parent6503c16035a75687c9edabd54449eeb4ec744906 (diff)
Operation on PNF
Operation on PNF Change-Id: I51448659eb5e730f42f30c6b5978809cfa1c9b6c Issue-ID: SDC-2054 Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
Diffstat (limited to 'catalog-model/src/test')
-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();