summaryrefslogtreecommitdiffstats
path: root/forwarding/src/test
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2021-07-07 14:21:34 -0400
committerRam Krishna Verma <ram_krishna.verma@bell.ca>2021-07-07 14:57:57 -0400
commit9eba753aed9d5575fa24ab8806e4d614668c75cb (patch)
tree181eb2b234fc01a14629e882d4356cf351405f38 /forwarding/src/test
parent49d86a99c3ed1920e3d999d85b7ae95a61b8d23a (diff)
Use lombok in policy/distribution
Use lombok for getter, setter, constructor & builder functions. Remove unused classes. Remove duplicate classes for testing exceptions. Issue-ID: POLICY-3393 Change-Id: I8a565bc6a5699b8716982f84e03b6a11d08ce65b Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'forwarding/src/test')
-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
1 files changed, 5 insertions, 16 deletions
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());
- }
-
}