Added junit coverage to CoreException class
[appc.git] / appc-client / client-lib / src / test / java / org / onap / appc / client / impl / core / CoreExceptionTest.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * ONAP : APPC\r
4  * ================================================================================\r
5  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  * Copyright (C) 2017 Amdocs\r
8  * =============================================================================\r
9  * Licensed under the Apache License, Version 2.0 (the "License");\r
10  * you may not use this file except in compliance with the License.\r
11  * You may obtain a copy of the License at\r
12  *\r
13  *      http://www.apache.org/licenses/LICENSE-2.0\r
14  *\r
15  * Unless required by applicable law or agreed to in writing, software\r
16  * distributed under the License is distributed on an "AS IS" BASIS,\r
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
18  * See the License for the specific language governing permissions and\r
19  * limitations under the License.\r
20  *\r
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
22  * ============LICENSE_END=========================================================\r
23  */\r
24 \r
25 package org.onap.appc.client.impl.core;\r
26 \r
27 import static org.junit.Assert.*;\r
28 import org.junit.Test;\r
29 \r
30 public class CoreExceptionTest {\r
31     @Test\r
32     public void testCoreException() {\r
33         CoreException ce = new CoreException();\r
34         assertNotNull(ce);\r
35     }\r
36 \r
37     @Test\r
38     public void testCoreExceptionString() {\r
39         CoreException ce = new CoreException(new String("testCoreExceptionString"));\r
40         assertNotNull(ce.getMessage());\r
41     }\r
42 \r
43     @Test\r
44     public void testCoreExceptionStringThrowable() {\r
45         Throwable tr = new Throwable();\r
46         CoreException ce = new CoreException("abc", tr);\r
47         assertNotNull(ce.getMessage());\r
48     }\r
49 \r
50     @Test\r
51     public void testCoreExceptionThrowable() {\r
52         CoreException ce = new CoreException(new Throwable());\r
53         assertNotNull(ce.getMessage());\r
54     }\r
55 }