summaryrefslogtreecommitdiffstats
path: root/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/RestCDUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/RestCDUtils.java')
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/RestCDUtils.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/RestCDUtils.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/RestCDUtils.java
index b2bad99d2a..aa219d0d12 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/RestCDUtils.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/RestCDUtils.java
@@ -32,7 +32,6 @@ import java.util.Map;
import java.util.stream.Collectors;
import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.model.Component;
@@ -253,23 +252,26 @@ public class RestCDUtils {
final String userId = defaultAdminUser.getUserId();
List<Component> resourcesArrayList = map.get("products");
- List<String> collect = resourcesArrayList.stream().filter(s -> s.getName().startsWith("Ci")).map(e -> e.getUniqueId())
- .collect(Collectors.toList());
+ List<String> collect = resourcesArrayList.stream().filter(s -> s.getName().startsWith(ElementFactory.getProductPrefix())).
+ map(e -> e.getUniqueId()).
+ collect(Collectors.toList());
for (String uId : collect) {
ProductRestUtils.deleteProduct(uId, userId);
}
resourcesArrayList = map.get("services");
- collect = resourcesArrayList.stream().filter(s -> s.getName().startsWith("ci")).map(e -> e.getUniqueId())
- .collect(Collectors.toList());
+ collect = resourcesArrayList.stream().filter(s -> s.getName().startsWith(ElementFactory.getServicePrefix())).
+ map(e -> e.getUniqueId()).
+ collect(Collectors.toList());
for (String uId : collect) {
ServiceRestUtils.markServiceToDelete(uId, userId);
}
ServiceRestUtils.deleteMarkedServices(userId);
resourcesArrayList = map.get("resources");
- collect = resourcesArrayList.stream().filter(s -> s.getName().startsWith("ci"))
- .map(e -> e.getUniqueId()).collect(Collectors.toList());
+ collect = resourcesArrayList.stream().filter(s -> s.getName().startsWith(ElementFactory.getResourcePrefix())).
+ map(e -> e.getUniqueId()).
+ collect(Collectors.toList());
for (String uId : collect) {
ResourceRestUtils.markResourceToDelete(uId, userId);
}