aboutsummaryrefslogtreecommitdiffstats
path: root/core/core-engine/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-04-28 15:45:22 -0400
committerJim Hahn <jrh3@att.com>2021-05-03 15:44:08 -0400
commite168ce2fad71650ad730519c772a9b093c0a8f43 (patch)
tree8d97f8823eb4f97916b2c19909c6b13e6a008e4a /core/core-engine/src/test
parentcb09008c4d252dbc9a62f3a1d0b463a74380aa77 (diff)
Remove GroupValidationResult
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Issue-ID: POLICY-2059 Change-Id: I2c0c01fac355e6cde4d8d6998dc42f8a2e2ebb65 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'core/core-engine/src/test')
-rw-r--r--core/core-engine/src/test/java/org/onap/policy/apex/core/engine/EngineParametersTest.java4
-rw-r--r--core/core-engine/src/test/java/org/onap/policy/apex/core/engine/ExecutorParametersTest.java15
2 files changed, 13 insertions, 6 deletions
diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/EngineParametersTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/EngineParametersTest.java
index ba936f24a..5427c3515 100644
--- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/EngineParametersTest.java
+++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/EngineParametersTest.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +22,7 @@
package org.onap.policy.apex.core.engine;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -59,6 +61,8 @@ public class EngineParametersTest {
taskParameters.add(new TaskParameters("param1key", "param1value", "param1taskId"));
taskParameters.add(new TaskParameters("param1key", "param1value", null));
pars.setTaskParameters(taskParameters);
+
+ assertThat(pars.validate().getResult()).isNull();
assertTrue(pars.validate().isValid());
ParameterService.register(pars);
diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/ExecutorParametersTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/ExecutorParametersTest.java
index 88c8c852d..784580422 100644
--- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/ExecutorParametersTest.java
+++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/ExecutorParametersTest.java
@@ -1,25 +1,27 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* 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=========================================================
*/
package org.onap.policy.apex.core.engine;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -47,10 +49,11 @@ public class ExecutorParametersTest {
assertEquals("ExecutorParameters [name=Name, taskExecutorPluginClass=some.task.executor.plugin.class, "
+ "taskSelectionExecutorPluginClass=some.task.selection.executor.plugin.class, "
+ "stateFinalizerExecutorPluginClass=some.state.finalizer.plugin.class]", pars.toString());
-
+
+ assertThat(pars.validate().getResult()).isNull();
assertTrue(pars.validate().isValid());
-
-
+
+
ParameterService.register(pars);
ParameterService.deregister(pars);
}