diff options
Diffstat (limited to 'main/src/test/java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/TestExceptions.java | 17 | ||||
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java | 4 |
2 files changed, 9 insertions, 12 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/TestExceptions.java b/main/src/test/java/org/onap/policy/pap/main/TestExceptions.java index b45cdab7..9e3cda9c 100644 --- a/main/src/test/java/org/onap/policy/pap/main/TestExceptions.java +++ b/main/src/test/java/org/onap/policy/pap/main/TestExceptions.java @@ -1,6 +1,7 @@ -/*- +/* * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +21,10 @@ package org.onap.policy.pap.main; -import static org.junit.Assert.assertNotNull; - -import java.io.IOException; - import org.junit.Test; +import org.onap.policy.common.utils.test.ExceptionsTester; +import org.onap.policy.pap.main.PolicyPapException; +import org.onap.policy.pap.main.PolicyPapRuntimeException; /** * Class to perform unit test of {@link PolicyPapException PolicyPapRuntimeException}}. @@ -35,10 +35,7 @@ public class TestExceptions { @Test public void test() { - assertNotNull(new PolicyPapException("Message")); - assertNotNull(new PolicyPapException("Message", new IOException())); - - assertNotNull(new PolicyPapRuntimeException("Message")); - assertNotNull(new PolicyPapRuntimeException("Message", new IOException())); + new ExceptionsTester().test(PolicyPapException.class); + new ExceptionsTester().test(PolicyPapRuntimeException.class); } } diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java index 0384bf7e..dd4fe937 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java @@ -82,7 +82,7 @@ public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer { } @Test - public void testDeletePolicies() throws Exception { + public void testDeletePolicy() throws Exception { String uri = DELETE_POLICIES_ENDPOINT + "/my-name"; Invocation.Builder invocationBuilder = sendRequest(uri); @@ -101,7 +101,7 @@ public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer { } @Test - public void testDeletePoliciesVersion() throws Exception { + public void testDeletePolicyVersion() throws Exception { String uri = DELETE_POLICIES_ENDPOINT + "/my-name/versions/3"; Invocation.Builder invocationBuilder = sendRequest(uri); |