aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-simulator/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'participant/participant-impl/participant-impl-simulator/src/test/java')
-rw-r--r--participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/endtoend/ParticipantSimulatorTest.java6
-rw-r--r--participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/CommonTestData.java23
-rw-r--r--participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/TestParticipantSimulatorParameters.java7
3 files changed, 5 insertions, 31 deletions
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/endtoend/ParticipantSimulatorTest.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/endtoend/ParticipantSimulatorTest.java
index 46495f7c3..0b63c395a 100644
--- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/endtoend/ParticipantSimulatorTest.java
+++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/endtoend/ParticipantSimulatorTest.java
@@ -40,6 +40,7 @@ import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.Parti
import org.onap.policy.clamp.controlloop.models.messages.rest.TypedSimpleResponse;
import org.onap.policy.clamp.controlloop.participant.intermediary.api.ParticipantIntermediaryApi;
import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ControlLoopUpdateListener;
+import org.onap.policy.clamp.controlloop.participant.intermediary.handler.ParticipantHandler;
import org.onap.policy.clamp.controlloop.participant.simulator.main.parameters.CommonTestData;
import org.onap.policy.clamp.controlloop.participant.simulator.main.rest.AbstractRestController;
import org.onap.policy.clamp.controlloop.participant.simulator.main.rest.TestListenerUtils;
@@ -89,6 +90,9 @@ class ParticipantSimulatorTest {
@Autowired
private ParticipantIntermediaryApi participantIntermediaryApi;
+ @Autowired
+ private ParticipantHandler participantHandler;
+
private static final Object lockit = new Object();
private boolean check = false;
@@ -97,7 +101,7 @@ class ParticipantSimulatorTest {
if (!check) {
check = true;
ControlLoopUpdateListener clUpdateListener =
- new ControlLoopUpdateListener(participantIntermediaryApi.getParticipantHandler());
+ new ControlLoopUpdateListener(participantHandler);
ParticipantControlLoopUpdate participantControlLoopUpdateMsg =
TestListenerUtils.createControlLoopUpdateMsg();
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/CommonTestData.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/CommonTestData.java
index c53410b28..e85b3ebbe 100644
--- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/CommonTestData.java
+++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/CommonTestData.java
@@ -65,30 +65,7 @@ public class CommonTestData {
public Map<String, Object> getParticipantParameterGroupMap(final String name) {
final Map<String, Object> map = new TreeMap<>();
- map.put("name", name);
map.put("intermediaryParameters", getIntermediaryParametersMap(false));
- map.put("databaseProviderParameters", getDatabaseProviderParametersMap(false));
- return map;
- }
-
- /**
- * Returns a property map for a databaseProviderParameters map for test cases.
- *
- * @param isEmpty boolean value to represent that object created should be empty or not
- * @return a property map suitable for constructing an object
- */
- public Map<String, Object> getDatabaseProviderParametersMap(final boolean isEmpty) {
- final Map<String, Object> map = new TreeMap<>();
- if (!isEmpty) {
- map.put("name", "PolicyProviderParameterGroup");
- map.put("implementation", "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl");
- map.put("databaseDriver", "org.h2.Driver");
- map.put("databaseUrl", "jdbc:h2:mem:testdb");
- map.put("databaseUser", "policy");
- map.put("databasePassword", "P01icY");
- map.put("persistenceUnit", "ToscaConceptTest");
- }
-
return map;
}
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/TestParticipantSimulatorParameters.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/TestParticipantSimulatorParameters.java
index e5c7b5e30..3c1d1c2a3 100644
--- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/TestParticipantSimulatorParameters.java
+++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/parameters/TestParticipantSimulatorParameters.java
@@ -47,13 +47,6 @@ class TestParticipantSimulatorParameters {
}
@Test
- void testParticipantParameterGroup_EmptyDatabaseProviderParameters() {
- final ParticipantSimulatorParameters participantParameters = commonTestData.getParticipantSimulatorParameters();
- participantParameters.setDatabaseProviderParameters(null);
- assertThat(validatorFactory.getValidator().validate(participantParameters)).isNotEmpty();
- }
-
- @Test
void testParticipantPolicyParameters_NullTopicSinks() {
final ParticipantSimulatorParameters participantParameters = commonTestData.getParticipantSimulatorParameters();
participantParameters.getIntermediaryParameters().getClampControlLoopTopics().setTopicSinks(null);