* ============LICENSE_END=========================================================
*/
-package org.onap.policy.distribution.reception.handling.sdc;
+package org.onap.policy.distribution.main.testclasses;
import java.util.ArrayList;
import java.util.Collection;
-
import org.onap.policy.distribution.forwarding.ArtifactForwarder;
import org.onap.policy.distribution.forwarding.ArtifactForwardingException;
-import org.onap.sdc.api.notification.IArtifactInfo;
+import org.onap.policy.distribution.model.PolicyInput;
/**
* Class to create a dummy forwarder for test cases.
*/
public class DummyArtifactForwarder implements ArtifactForwarder {
private int numberOfPoliciesReceived = 0;
- private Collection<IArtifactInfo> policiesReceived = new ArrayList<>();
- /**
- * {@inheritDoc}.
- */
@Override
- public void forward(final Collection<IArtifactInfo> policies) throws ArtifactForwardingException {
- numberOfPoliciesReceived += policies.size();
- policiesReceived.addAll(policies);
+ public void forward(final PolicyInput policy) throws ArtifactForwardingException {
+ numberOfPoliciesReceived += 1;
}
- /**
- * Returns the number of policies received by this forwarder.
- *
- * @return the integer value
- */
public int getNumberOfPoliciesReceived() {
return numberOfPoliciesReceived;
}
- /**
- * Checks if the forwarder has received a policy with given policy type.
- *
- * @param policyType the policy type
- * @return the boolean result
- */
- public boolean receivedPolicyWithGivenType(final String policyType) {
- return true;
- }
-
- /**
- * {@inheritDoc}.
- */
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(String parameterGroupName) {}
}