summaryrefslogtreecommitdiffstats
path: root/models-sim/policy-models-sim-pdp/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-07-30 10:33:13 -0400
committerJim Hahn <jrh3@att.com>2019-07-31 09:23:08 -0400
commitf4118b341c16c93918e4cc57710128e8ad8407ec (patch)
treef0ec54ab8c19d1b4a217ce608444a1c3d08abc22 /models-sim/policy-models-sim-pdp/src/test
parent396d5e544a29c89d49662a8aa42819b99e8826f0 (diff)
Use new addTopic() method in models
Replaced ParameterUtils with the use of the new addTopic(TopicParameterGroup) method. Used separate addTopicXxx() methods per review comment. Change-Id: I755b75f986a5c42f01bcad5a22472a46766d192d Issue-ID: POLICY-1953 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-sim/policy-models-sim-pdp/src/test')
-rw-r--r--models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorActivator.java5
-rw-r--r--models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpStateChangeListener.java7
-rw-r--r--models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpUpdateListener.java7
3 files changed, 3 insertions, 16 deletions
diff --git a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorActivator.java b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorActivator.java
index b2ab08760..1ebd2a082 100644
--- a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorActivator.java
+++ b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorActivator.java
@@ -28,11 +28,9 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.common.endpoints.utils.ParameterUtils;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStatus;
import org.onap.policy.models.sim.pdp.exception.PdpSimulatorException;
@@ -62,8 +60,7 @@ public class TestPdpSimulatorActivator {
new PdpSimulatorCommandLineArguments(pdpSimulatorConfigParameters);
final PdpSimulatorParameterGroup parGroup = new PdpSimulatorParameterHandler().getParameters(arguments);
- final Properties props = ParameterUtils.getTopicProperties(parGroup.getTopicParameterGroup());
- activator = new PdpSimulatorActivator(parGroup, props);
+ activator = new PdpSimulatorActivator(parGroup);
}
/**
diff --git a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpStateChangeListener.java b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpStateChangeListener.java
index 2b3704738..93015e94e 100644
--- a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpStateChangeListener.java
+++ b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpStateChangeListener.java
@@ -31,12 +31,10 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.ParameterUtils;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStateChange;
import org.onap.policy.models.pdp.concepts.PdpStatus;
@@ -88,10 +86,7 @@ public class TestPdpStateChangeListener {
// Read the parameters
pdpSimulatorParameterGroup = new PdpSimulatorParameterHandler().getParameters(arguments);
- // Read the properties
- final Properties topicProperties =
- ParameterUtils.getTopicProperties(pdpSimulatorParameterGroup.getTopicParameterGroup());
- activator = new PdpSimulatorActivator(pdpSimulatorParameterGroup, topicProperties);
+ activator = new PdpSimulatorActivator(pdpSimulatorParameterGroup);
Registry.register(PdpSimulatorConstants.REG_PDP_SIMULATOR_ACTIVATOR, activator);
activator.initialize();
}
diff --git a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpUpdateListener.java b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpUpdateListener.java
index 9ae8d370a..7bf70ddc1 100644
--- a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpUpdateListener.java
+++ b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpUpdateListener.java
@@ -31,12 +31,10 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.ParameterUtils;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStatus;
import org.onap.policy.models.pdp.concepts.PdpUpdate;
@@ -82,10 +80,7 @@ public class TestPdpUpdateListener {
// Read the parameters
pdpSimulatorParameterGroup = new PdpSimulatorParameterHandler().getParameters(arguments);
- // Read the properties
- final Properties topicProperties =
- ParameterUtils.getTopicProperties(pdpSimulatorParameterGroup.getTopicParameterGroup());
- activator = new PdpSimulatorActivator(pdpSimulatorParameterGroup, topicProperties);
+ activator = new PdpSimulatorActivator(pdpSimulatorParameterGroup);
Registry.register(PdpSimulatorConstants.REG_PDP_SIMULATOR_ACTIVATOR, activator);
activator.initialize();
pdpUpdateMessageListener = new PdpUpdateListener();