summaryrefslogtreecommitdiffstats
path: root/plugins/reception-plugins/src/test/java
diff options
context:
space:
mode:
authormmis <michael.morris@ericsson.com>2018-09-05 17:12:03 +0100
committermmis <michael.morris@ericsson.com>2018-09-05 17:34:25 +0100
commit0089e8bc429001eca2997b44168b05889cb75d38 (patch)
tree943152987d7aa192fa35bdd76db713bec2463d55 /plugins/reception-plugins/src/test/java
parent461cafda67a99f4cc27ea41539d1748b6c87a79c (diff)
Refactored reception handler parameter handling
Refactored parameter handling for configuration of reception handlers as the previous implementation does not align with the plugin architecture (.e. plugin specific parameters being handled in core code) Issue-ID: POLICY-1094 Change-Id: I31a9fc7f712ca43f0f69c42a6d99fa481b02cd4b Signed-off-by: mmis <michael.morris@ericsson.com>
Diffstat (limited to 'plugins/reception-plugins/src/test/java')
-rw-r--r--plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcConfiguration.java9
-rw-r--r--plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandler.java5
2 files changed, 6 insertions, 8 deletions
diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcConfiguration.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcConfiguration.java
index e1ba00cf..65d7ca10 100644
--- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcConfiguration.java
+++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcConfiguration.java
@@ -34,7 +34,6 @@ import java.util.Arrays;
import org.junit.Test;
import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.distribution.reception.parameters.PssdConfigurationParametersGroup;
/**
* Class to perform unit test of {@link SdcConfiguration}.
@@ -44,11 +43,11 @@ public class TestSdcConfiguration {
@Test
public void testSdcConfiguration() throws IOException {
- PssdConfigurationParametersGroup configParameters = null;
+ SdcReceptionHandlerConfigurationParameterGroup configParameters = null;
try {
final Gson gson = new GsonBuilder().create();
configParameters = gson.fromJson(new FileReader("src/test/resources/handling-sdc.json"),
- PssdConfigurationParametersGroup.class);
+ SdcReceptionHandlerConfigurationParameterGroup.class);
} catch (final Exception e) {
fail("test should not thrown an exception here: " + e.getMessage());
}
@@ -74,11 +73,11 @@ public class TestSdcConfiguration {
@Test
public void testInvalidSdcConfiguration() throws IOException {
- PssdConfigurationParametersGroup configParameters = null;
+ SdcReceptionHandlerConfigurationParameterGroup configParameters = null;
try {
final Gson gson = new GsonBuilder().create();
configParameters = gson.fromJson(new FileReader("src/test/resources/handling-sdcInvalid.json"),
- PssdConfigurationParametersGroup.class);
+ SdcReceptionHandlerConfigurationParameterGroup.class);
} catch (final Exception e) {
fail("test should not thrown an exception here: " + e.getMessage());
}
diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandler.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandler.java
index 02b83849..c876f99c 100644
--- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandler.java
+++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandler.java
@@ -42,7 +42,6 @@ import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.common.parameters.ParameterService;
import org.onap.policy.distribution.reception.decoding.PluginInitializationException;
import org.onap.policy.distribution.reception.decoding.PluginTerminationException;
-import org.onap.policy.distribution.reception.parameters.PssdConfigurationParametersGroup;
import org.onap.sdc.api.results.IDistributionClientResult;
import org.onap.sdc.impl.mock.DistributionClientStubImpl;
import org.onap.sdc.utils.DistributionActionResultEnum;
@@ -64,7 +63,7 @@ public class TestSdcReceptionHandler {
@Mock
private DistributionClientStubImpl distributionClient;
- private PssdConfigurationParametersGroup pssdConfigParameters;
+ private SdcReceptionHandlerConfigurationParameterGroup pssdConfigParameters;
private SdcReceptionHandler sypHandler;
/**
@@ -76,7 +75,7 @@ public class TestSdcReceptionHandler {
public final void init() throws IOException {
final Gson gson = new GsonBuilder().create();
pssdConfigParameters = gson.fromJson(new FileReader("src/test/resources/handling-sdc.json"),
- PssdConfigurationParametersGroup.class);
+ SdcReceptionHandlerConfigurationParameterGroup.class);
ParameterService.register(pssdConfigParameters);
final SdcReceptionHandler sdcHandler = new SdcReceptionHandler();
sypHandler = Mockito.spy(sdcHandler);