aboutsummaryrefslogtreecommitdiffstats
path: root/services/activity-spec/activity-spec-web/activity-spec-service/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'services/activity-spec/activity-spec-web/activity-spec-service/src/test')
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecZusammenDaoImplTest.java6
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/impl/ActivitySpecManagerImplTest.java10
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/mocks/ItemManagerMock.java16
3 files changed, 19 insertions, 13 deletions
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecZusammenDaoImplTest.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecZusammenDaoImplTest.java
index e6b8123823..b03f4544d2 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecZusammenDaoImplTest.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/dao/impl/ActivitySpecZusammenDaoImplTest.java
@@ -94,7 +94,7 @@ public class ActivitySpecZusammenDaoImplTest {
inputParams.setValue("localhost");
List<ActivitySpecParameter> inputs = new ArrayList<>();
inputs.add(inputParams);
- entity.setInputParameters(inputs);
+ entity.setInputs(inputs);
}
@AfterMethod
@@ -130,8 +130,8 @@ public class ActivitySpecZusammenDaoImplTest {
.getElement(context, elementContext, zusammenAdaptor.elementId);
final InputStream data = testElement.get().getData();
final ActivitySpecData activitySpecData = JsonUtil.json2Object(data, ActivitySpecData.class);
- Assert.assertEquals(activitySpecData.getInputParameters().get(0).getName(),
- entity.getInputParameters().get(0).getName());
+ Assert.assertEquals(activitySpecData.getInputs().get(0).getName(),
+ entity.getInputs().get(0).getName());
}
@Test
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/impl/ActivitySpecManagerImplTest.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/impl/ActivitySpecManagerImplTest.java
index ce0f2883fa..3576ae81c7 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/impl/ActivitySpecManagerImplTest.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/impl/ActivitySpecManagerImplTest.java
@@ -47,7 +47,7 @@ import java.util.List;
public class ActivitySpecManagerImplTest {
private static final String STRING_TYPE = "String";
- ActivitySpecEntity activitySpec;
+ private ActivitySpecEntity activitySpec;
private ActivitySpecEntity retrieved;
private ActivitySpecEntity input;
private ActivitySpecEntity activitySpecToCreate;
@@ -106,13 +106,13 @@ public class ActivitySpecManagerImplTest {
List<ActivitySpecParameter> inputs = new ArrayList<>();
inputs.add(inputParams);
inputs.add(inputParams1);
- activitySpecToCreate.setInputParameters(inputs);
+ activitySpecToCreate.setInputs(inputs);
ActivitySpecParameter outputParams = new ActivitySpecParameter("status", STRING_TYPE);
outputParams.setValue("started");
List<ActivitySpecParameter> outputs = new ArrayList<>();
outputs.add(outputParams);
- activitySpecToCreate.setOutputParameters(outputs);
+ activitySpecToCreate.setOutputs(outputs);
activitySpec = activitySpecManager.createActivitySpec
(activitySpecToCreate);
@@ -239,7 +239,7 @@ public class ActivitySpecManagerImplTest {
Assert.assertEquals(actual.getName(), expected.getName());
Assert.assertEquals(actual.getDescription(), expected.getDescription());
Assert.assertEquals(actual.getCategoryList(), expected.getCategoryList());
- Assert.assertEquals(actual.getInputParameters(), expected.getInputParameters());
- Assert.assertEquals(actual.getOutputParameters(), expected.getOutputParameters());
+ Assert.assertEquals(actual.getInputs(), expected.getInputs());
+ Assert.assertEquals(actual.getOutputs(), expected.getOutputs());
}
}
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/mocks/ItemManagerMock.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/mocks/ItemManagerMock.java
index 667a97b3a4..2a0586c003 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/mocks/ItemManagerMock.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/mocks/ItemManagerMock.java
@@ -18,9 +18,7 @@ package org.openecomp.activityspec.mocks;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
-import java.util.stream.Collectors;
import org.openecomp.sdc.versioning.dao.types.VersionStatus;
import org.openecomp.sdc.versioning.types.Item;
import org.openecomp.sdc.versioning.ItemManager;
@@ -30,15 +28,14 @@ import java.util.function.Predicate;
public class ItemManagerMock implements ItemManager {
- public String id;
- public Item item;
+ private String id;
+ private Item item;
@Override
public Collection<Item> list(Predicate<Item> predicate) {
List<Item> items = new ArrayList<>();
items.add(item);
- Collection<Item> collection = items;
return items;
}
@@ -61,6 +58,15 @@ public class ItemManagerMock implements ItemManager {
}
+ @Override
+ public void archive(Item item) {
+
+ }
+
+ @Override
+ public void restore(Item item) {
+
+ }
@Override