diff options
Diffstat (limited to 'catalog-model/src/test')
-rw-r--r-- | catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java index 9f8d015a44..e77f8e108c 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java @@ -12,8 +12,10 @@ import org.openecomp.sdc.be.dao.jsongraph.TitanDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; +import org.openecomp.sdc.be.model.ComponentParametersView; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.ModelTestBase; +import org.openecomp.sdc.be.model.jsontitan.datamodel.TopologyTemplate; import org.openecomp.sdc.be.model.jsontitan.datamodel.ToscaElement; import org.openecomp.sdc.be.model.jsontitan.utils.GraphTestUtils; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; @@ -61,6 +63,7 @@ public class ToscaElementOperationTest extends ModelTestBase{ } } + @Test public void testGetAllHighestResourcesNoFilter() { @@ -218,6 +221,18 @@ public class ToscaElementOperationTest extends ModelTestBase{ assertEquals(highestResources.stream().count(), highestResourcesExpectedCount); } + @Test + public void testUpdateToscaElement_NotFound() { + Either<TopologyTemplate, StorageOperationStatus> result; + TopologyTemplate topologyTemplate = new TopologyTemplate(); + String userID = "userID"; + topologyTemplate.setLastUpdaterUserId(userID); + GraphVertex graphVertex = new GraphVertex(); + ComponentParametersView componentParametersView = new ComponentParametersView(); + result = toscaElementOperation.updateToscaElement(topologyTemplate, graphVertex, componentParametersView); + assertEquals(null, result); + } + private boolean genericTestGetResourcesWithExcludeList(List<ResourceTypeEnum> excludeList) { Either<List<ToscaElement>, StorageOperationStatus> highestResourcesRes = toscaElementOperation.getElementCatalogData(ComponentTypeEnum.RESOURCE,excludeList, true); assertTrue(highestResourcesRes.isLeft()); |