aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-onappf/src/test')
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterActivator.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterActivator.java)13
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterConstants.java)3
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterMain.java)9
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpStateChangeListener.java)16
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpUpdateListener.java)17
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/exception/TestExceptions.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/exception/TestExceptions.java)4
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/CommonTestData.java)3
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterGroup.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterGroup.java)4
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterHandler.java)8
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestPdpStatusParameters.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestPdpStatusParameters.java)3
-rw-r--r--services/services-onappf/src/test/resources/ApexStarterConfigParameters.json7
-rw-r--r--services/services-onappf/src/test/resources/topic.properties18
12 files changed, 69 insertions, 36 deletions
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterActivator.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterActivator.java
index 6da3a5eb6..238a89f66 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterActivator.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterActivator.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
@@ -33,10 +33,13 @@ import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler;
-import org.onap.policy.apex.starter.parameters.CommonTestData;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
+import org.onap.policy.apex.services.onappf.parameters.CommonTestData;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStatus;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterConstants.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
index 08e56cdf8..52ca94439 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterConstants.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
@@ -18,9 +18,10 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import org.junit.Test;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
import org.powermock.reflect.Whitebox;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterMain.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java
index 3005e320a..c5c0fc483 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterMain.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -27,8 +27,11 @@ import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.parameters.CommonTestData;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.ApexStarterMain;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.CommonTestData;
import org.onap.policy.common.utils.services.Registry;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpStateChangeListener.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java
index d0a85f9f2..34025a1ad 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpStateChangeListener.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.comm;
+package org.onap.policy.apex.services.onappf.comm;
import static org.junit.Assert.assertEquals;
@@ -37,12 +37,14 @@ import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.ApexStarterActivator;
-import org.onap.policy.apex.starter.ApexStarterCommandLineArguments;
-import org.onap.policy.apex.starter.ApexStarterConstants;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.comm.PdpStateChangeListener;
+import org.onap.policy.apex.services.onappf.comm.PdpUpdateListener;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStateChange;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpUpdateListener.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java
index 2ffed2cb6..921cfd283 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpUpdateListener.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.comm;
+package org.onap.policy.apex.services.onappf.comm;
import static org.junit.Assert.assertEquals;
@@ -37,13 +37,14 @@ import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.ApexStarterActivator;
-import org.onap.policy.apex.starter.ApexStarterCommandLineArguments;
-import org.onap.policy.apex.starter.ApexStarterConstants;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.handler.PdpMessageHandler;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.comm.PdpUpdateListener;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.handler.PdpMessageHandler;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStatus;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/exception/TestExceptions.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/exception/TestExceptions.java
index 63ebeb608..3a05e72b1 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/exception/TestExceptions.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/exception/TestExceptions.java
@@ -18,9 +18,11 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.exception;
+package org.onap.policy.apex.services.onappf.exception;
import org.junit.Test;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterRunTimeException;
import org.onap.policy.common.utils.test.ExceptionsTester;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/CommonTestData.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java
index d329d1f22..e4946dd2b 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/CommonTestData.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java
@@ -18,13 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
+import org.onap.policy.apex.services.onappf.parameters.ToscaPolicyTypeIdentifierParameters;
import org.onap.policy.common.parameters.ParameterGroup;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.CoderException;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterGroup.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterGroup.java
index 8d5f1cef9..c843c6787 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterGroup.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterGroup.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -100,7 +100,7 @@ public class TestApexStarterParameterGroup {
final GroupValidationResult validationResult = apexStarterParameters.validate();
assertFalse(validationResult.isValid());
assertTrue(validationResult.getResult()
- .contains("\"org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup\" INVALID, "
+ .contains("\"org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup\" INVALID, "
+ "parameter group has status INVALID"));
}
}
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterHandler.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java
index baa91d23a..f91baeb45 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterHandler.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -27,8 +27,10 @@ import static org.junit.Assert.fail;
import java.io.FileNotFoundException;
import org.junit.Test;
-import org.onap.policy.apex.starter.ApexStarterCommandLineArguments;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
import org.onap.policy.common.utils.coder.CoderException;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestPdpStatusParameters.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestPdpStatusParameters.java
index 37cbbe021..e8a3f7ee0 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestPdpStatusParameters.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestPdpStatusParameters.java
@@ -18,13 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
+import org.onap.policy.apex.services.onappf.parameters.PdpStatusParameters;
import org.onap.policy.common.parameters.GroupValidationResult;
/**
diff --git a/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json b/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
index 6b9df6014..b1ea14de7 100644
--- a/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
+++ b/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
@@ -1,10 +1,9 @@
{
"name":"ApexStarterParameterGroup",
"pdpStatusParameters":{
- "timeIntervalMs": 2000,
- "pdpName":"apex-pdp",
+ "timeIntervalMs": 120000,
"pdpType":"apex",
"description":"Pdp status for HealthCheck",
- "supportedPolicyTypes":[{"name":"policy1","version":"1.0"},{"name":"policy2","version":"1.0"}]
+ "supportedPolicyTypes":[{"name":"onap.policies.controlloop.Operational","version":"1.0.0"}]
}
-}
+} \ No newline at end of file
diff --git a/services/services-onappf/src/test/resources/topic.properties b/services/services-onappf/src/test/resources/topic.properties
index 87c6ebd54..9f3c21dff 100644
--- a/services/services-onappf/src/test/resources/topic.properties
+++ b/services/services-onappf/src/test/resources/topic.properties
@@ -1,3 +1,21 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
noop.sink.topics=POLICY-PDP-PAP
noop.sink.topics.POLICY-PDP-PAP.servers=anyserver
noop.source.topics=POLICY-PDP-PAP