From 7d8c592bdd302fe59fe12b134af941c2dd6ab058 Mon Sep 17 00:00:00 2001 From: siddharth0905 Date: Mon, 21 Jan 2019 12:02:57 +0530 Subject: Operation on PNF Operation on PNF Change-Id: I51448659eb5e730f42f30c6b5978809cfa1c9b6c Issue-ID: SDC-2054 Signed-off-by: siddharth0905 --- .../sdc/be/model/jsontitan/utils/ModelConverterTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'catalog-model/src/test/java/org') 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) @@ -85,6 +87,16 @@ public class ModelConverterTest { assertThat(component.getToscaType()).isEqualTo(ToscaElementTypeEnum.TOPOLOGY_TEMPLATE.getValue()); } + @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() { -- cgit 1.2.3-korg