diff options
author | liboNet <libo.zhu@intel.com> | 2019-04-03 02:26:05 +0800 |
---|---|---|
committer | liboNet <libo.zhu@intel.com> | 2019-04-03 02:26:05 +0800 |
commit | 41373a9619308bdbab6a31c02fe3d54e91ac6ee3 (patch) | |
tree | 4e79dc6d6573e9fab2415294e5e926589b0f9827 /artifactbroker/plugins/reception-plugins/src/test | |
parent | b852967aa9ebbf7a37e562e562c21b9df76f04d7 (diff) |
add subplugin field support and new Cloud Artifact class
. add subplugin field to integrate with Distribution framework
. add new Cloud Artifact which is to be used by subplugin like k8s
. update test .json file to include reception and forward fields
. add dummy test class to ensure the flow works as expected
. fix typos
Change-Id: I9d69d88e448a18247e19b3b7a6062b20814b5f8c
Issue-ID: MULTICLOUD-512
Signed-off-by: liboNet <libo.zhu@intel.com>
Diffstat (limited to 'artifactbroker/plugins/reception-plugins/src/test')
-rw-r--r-- | artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java index 445d47c..e3bafc5 100644 --- a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java +++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyArtifactForwarder.java @@ -18,14 +18,13 @@ * ============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. @@ -34,39 +33,16 @@ import org.onap.sdc.api.notification.IArtifactInfo; */ 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) {} } |