aboutsummaryrefslogtreecommitdiffstats
path: root/forwarding/src
diff options
context:
space:
mode:
Diffstat (limited to 'forwarding/src')
-rw-r--r--forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java17
-rw-r--r--forwarding/src/test/java/org/onap/policy/distribution/forwarding/TestExceptions.java (renamed from forwarding/src/test/java/org/onap/policy/distribution/forwarding/PolicyDecodingExceptionTest.java)21
2 files changed, 8 insertions, 30 deletions
diff --git a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java
index bc8041a4..7e7718a1 100644
--- a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java
+++ b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java
@@ -3,6 +3,7 @@
* Copyright (C) 2018 Ericsson. All rights reserved.
* Copyright (C) 2019 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Bell Canada. 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.
@@ -22,6 +23,7 @@
package org.onap.policy.distribution.forwarding.parameters;
+import lombok.AllArgsConstructor;
import lombok.Getter;
import org.onap.policy.common.parameters.BeanValidationResult;
import org.onap.policy.common.parameters.BeanValidator;
@@ -37,6 +39,7 @@ import org.onap.policy.common.parameters.annotations.NotNull;
*/
@Getter
@NotBlank
+@AllArgsConstructor
public class PolicyForwarderParameters implements ParameterGroup {
private @NotNull String forwarderType;
@@ -44,20 +47,6 @@ public class PolicyForwarderParameters implements ParameterGroup {
private String forwarderConfigurationName;
/**
- * Constructor for instantiating PolicyForwarderParameters.
- *
- * @param forwarderType the policy forwarder type
- * @param forwarderClassName the policy forwarder class name
- * @param forwarderConfigurationName the name of the configuration for the policy forwarder
- */
- public PolicyForwarderParameters(final String forwarderType, final String forwarderClassName,
- final String forwarderConfigurationName) {
- this.forwarderType = forwarderType;
- this.forwarderClassName = forwarderClassName;
- this.forwarderConfigurationName = forwarderConfigurationName;
- }
-
- /**
* {@inheritDoc}.
*/
@Override
diff --git a/forwarding/src/test/java/org/onap/policy/distribution/forwarding/PolicyDecodingExceptionTest.java b/forwarding/src/test/java/org/onap/policy/distribution/forwarding/TestExceptions.java
index af820883..66e16651 100644
--- a/forwarding/src/test/java/org/onap/policy/distribution/forwarding/PolicyDecodingExceptionTest.java
+++ b/forwarding/src/test/java/org/onap/policy/distribution/forwarding/TestExceptions.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Copyright (C) 2021 Bell Canada. 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.
@@ -20,24 +20,13 @@
package org.onap.policy.distribution.forwarding;
-import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
+import org.onap.policy.common.utils.test.ExceptionsTester;
-public class PolicyDecodingExceptionTest {
+public class TestExceptions {
@Test
- public void testPolicyDecodingExceptionString() {
- final PolicyForwardingException policyDecodingException = new PolicyForwardingException("error message");
- assertEquals("error message", policyDecodingException.getMessage());
+ public void test() {
+ new ExceptionsTester().test(PolicyForwardingException.class);
}
-
- @Test
- public void testPolicyDecodingExceptionStringThrowable() {
- final Exception cause = new IllegalArgumentException();
- final PolicyForwardingException policyDecodingException = new PolicyForwardingException("error message", cause);
- assertEquals("error message", policyDecodingException.getMessage());
- assertEquals(cause, policyDecodingException.getCause());
- }
-
}