summaryrefslogtreecommitdiffstats
path: root/main/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/test/java')
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java10
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java11
2 files changed, 11 insertions, 10 deletions
diff --git a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java
index d210d970..b9ee0768 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java
@@ -22,27 +22,27 @@ package org.onap.policy.distribution.main.testclasses;
import java.util.Collection;
-import org.onap.policy.distribution.model.Policy;
import org.onap.policy.distribution.model.PolicyInput;
import org.onap.policy.distribution.reception.decoding.PolicyDecoder;
import org.onap.policy.distribution.reception.decoding.PolicyDecodingException;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity;
/**
* Class to create a dummy decoder for test cases.
*
* @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
*/
-public class DummyDecoder implements PolicyDecoder<PolicyInput, Policy> {
+public class DummyDecoder implements PolicyDecoder<PolicyInput, ToscaEntity> {
private boolean canHandleValue;
- private Collection<Policy> policesToReturn;
+ private Collection<ToscaEntity> policesToReturn;
public DummyDecoder() {
this.canHandleValue = false;
this.policesToReturn = null;
}
- public DummyDecoder(final boolean canHandleValue, final Collection<Policy> policesToReturn) {
+ public DummyDecoder(final boolean canHandleValue, final Collection<ToscaEntity> policesToReturn) {
this.canHandleValue = canHandleValue;
this.policesToReturn = policesToReturn;
}
@@ -53,7 +53,7 @@ public class DummyDecoder implements PolicyDecoder<PolicyInput, Policy> {
}
@Override
- public Collection<Policy> decode(final PolicyInput input) throws PolicyDecodingException {
+ public Collection<ToscaEntity> decode(final PolicyInput input) throws PolicyDecodingException {
return policesToReturn;
}
diff --git a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java
index c9c7fef2..f2779c85 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java
@@ -22,9 +22,10 @@ package org.onap.policy.distribution.main.testclasses;
import java.util.ArrayList;
import java.util.Collection;
+
import org.onap.policy.distribution.forwarding.PolicyForwarder;
import org.onap.policy.distribution.forwarding.PolicyForwardingException;
-import org.onap.policy.distribution.model.Policy;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity;
/**
* Class to create a dummy forwarder for test cases.
@@ -33,10 +34,10 @@ import org.onap.policy.distribution.model.Policy;
*/
public class DummyPolicyForwarder implements PolicyForwarder {
private int numberOfPoliciesReceived = 0;
- private Collection<Policy> policiesReceived = new ArrayList<>();
+ private Collection<ToscaEntity> policiesReceived = new ArrayList<>();
@Override
- public void forward(final Collection<Policy> policies) throws PolicyForwardingException {
+ public void forward(final Collection<ToscaEntity> policies) throws PolicyForwardingException {
numberOfPoliciesReceived += policies.size();
policiesReceived.addAll(policies);
}
@@ -45,10 +46,10 @@ public class DummyPolicyForwarder implements PolicyForwarder {
return numberOfPoliciesReceived;
}
- public boolean receivedPolicy(final Policy policy) {
+ public boolean receivedPolicy(final ToscaEntity policy) {
return policiesReceived.contains(policy);
}
@Override
- public void configure(String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {}
}