summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-25 15:05:31 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-25 14:24:44 +0000
commit05c625fb9c3673d6c60511958f7e051257247c2b (patch)
tree28df153c7f9bdfd5b5682a6ff4cbeced23f30d3c /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
parent22f1220c2dda43e3dcbadd70180db521a7984d1d (diff)
Refactor list revisions api
Remove zusammen-api dependency in versioning-api, enhance version zusammen dao impl UT. Issue-ID: SDC-779 Change-Id: Ic792462eac52f1f5129f92ce80d3deb641c90916 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java23
1 files changed, 11 insertions, 12 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
index 4690d75a68..418da9a770 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
@@ -36,6 +36,7 @@ import com.amdocs.zusammen.datatypes.item.ItemVersion;
import com.amdocs.zusammen.datatypes.item.ItemVersionData;
import com.amdocs.zusammen.datatypes.item.ItemVersionStatus;
import com.amdocs.zusammen.datatypes.item.Resolution;
+import com.amdocs.zusammen.datatypes.itemversion.ItemVersionRevisions;
import com.amdocs.zusammen.datatypes.itemversion.Tag;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.core.utilities.file.FileContentHandler;
@@ -46,7 +47,6 @@ import org.openecomp.sdc.model.impl.zusammen.ServiceModelDaoZusammenImpl;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.YamlUtil;
-import org.openecomp.sdc.versioning.dao.types.Revision;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -55,7 +55,6 @@ import java.io.ByteArrayInputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -255,7 +254,7 @@ public class ServiceModelDaoFactoryTest {
ElementContext elementContext,
Id parentElementId, String elementName) {
- if(elementName.equals(ElementType.VspModel.name())){
+ if (elementName.equals(ElementType.VspModel.name())) {
return elementInfoMap.values();
}
@@ -267,11 +266,11 @@ public class ServiceModelDaoFactoryTest {
ElementContext elementContext,
Id parentElementId, String elementName) {
- if(elementName.equals(ElementType.Templates.name())){
- return Optional.ofNullable(elementInfoMap.get("null" + elementName));
- }else if(elementName.equals(ElementType.Artifacts.name())) {
- return Optional.ofNullable(elementInfoMap.get("null" + elementName));
- }
+ if (elementName.equals(ElementType.Templates.name())) {
+ return Optional.ofNullable(elementInfoMap.get("null" + elementName));
+ } else if (elementName.equals(ElementType.Artifacts.name())) {
+ return Optional.ofNullable(elementInfoMap.get("null" + elementName));
+ }
return Optional.empty();
}
@@ -382,14 +381,14 @@ public class ServiceModelDaoFactoryTest {
}
@Override
- public void revert(SessionContext sessionContext, String itemId, String versionId,
- String revisionId) {
+ public void revert(SessionContext sessionContext, Id itemId, Id versionId,
+ Id revisionId) {
}
@Override
- public List<Revision> listRevisions(SessionContext sessionContext, String itemId,
- String versionId) {
+ public ItemVersionRevisions listRevisions(SessionContext sessionContext, Id itemId,
+ Id versionId) {
return null;
}