Reformat PolicyEngineAPI test cases
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / onap / policy / test / PolicyConfigExceptionTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineAPI
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Modifications Copyright (C) 2019 Samsung
8  * ================================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.policy.test;
24
25 import org.junit.*;
26 import org.onap.policy.api.PolicyConfigException;
27 import static org.junit.Assert.*;
28
29 /**
30  * The class <code>PolicyConfigExceptionTest</code> contains tests for the class
31  * <code>{@link PolicyConfigException}</code>.
32  *
33  * @generatedBy CodePro at 6/1/16 1:40 PM
34  * @version $Revision: 1.0 $
35  */
36 public class PolicyConfigExceptionTest {
37     /**
38      * Run the PolicyConfigException() constructor test.
39      *
40      * @throws Exception
41      *
42      * @generatedBy CodePro at 6/1/16 1:40 PM
43      */
44     @Test
45     public void testPolicyConfigException_1() throws Exception {
46
47         PolicyConfigException result = new PolicyConfigException();
48
49         // add additional test code here
50         assertNotNull(result);
51         assertEquals(null, result.getCause());
52         assertEquals("org.onap.policy.api.PolicyConfigException", result.toString());
53         assertEquals(null, result.getLocalizedMessage());
54         assertEquals(null, result.getMessage());
55     }
56
57     /**
58      * Run the PolicyConfigException(String) constructor test.
59      *
60      * @throws Exception
61      *
62      * @generatedBy CodePro at 6/1/16 1:40 PM
63      */
64     @Test
65     public void testPolicyConfigException_2() throws Exception {
66         String message = "";
67
68         PolicyConfigException result = new PolicyConfigException(message);
69
70         // add additional test code here
71         assertNotNull(result);
72         assertEquals(null, result.getCause());
73         assertEquals("org.onap.policy.api.PolicyConfigException: ", result.toString());
74         assertEquals("", result.getLocalizedMessage());
75         assertEquals("", result.getMessage());
76     }
77
78     /**
79      * Run the PolicyConfigException(Throwable) constructor test.
80      *
81      * @throws Exception
82      *
83      * @generatedBy CodePro at 6/1/16 1:40 PM
84      */
85     @Test
86     public void testPolicyConfigException_3() throws Exception {
87         Throwable cause = new Throwable();
88
89         PolicyConfigException result = new PolicyConfigException(cause);
90
91         // add additional test code here
92         assertNotNull(result);
93         assertEquals("org.onap.policy.api.PolicyConfigException: java.lang.Throwable",
94                 result.toString());
95         assertEquals("java.lang.Throwable", result.getLocalizedMessage());
96         assertEquals("java.lang.Throwable", result.getMessage());
97     }
98
99     /**
100      * Run the PolicyConfigException(String,Throwable) constructor test.
101      *
102      * @throws Exception
103      *
104      * @generatedBy CodePro at 6/1/16 1:40 PM
105      */
106     @Test
107     public void testPolicyConfigException_4() throws Exception {
108         String message = "";
109         Throwable cause = new Throwable();
110
111         PolicyConfigException result = new PolicyConfigException(message, cause);
112
113         // add additional test code here
114         assertNotNull(result);
115         assertEquals("org.onap.policy.api.PolicyConfigException: ", result.toString());
116         assertEquals("", result.getLocalizedMessage());
117         assertEquals("", result.getMessage());
118     }
119
120     /**
121      * Run the PolicyConfigException(String,Throwable,boolean,boolean) constructor test.
122      *
123      * @throws Exception
124      *
125      * @generatedBy CodePro at 6/1/16 1:40 PM
126      */
127     @Test
128     public void testPolicyConfigException_5() throws Exception {
129         String message = "";
130         Throwable cause = new Throwable();
131         boolean enableSuppression = true;
132         boolean writableStackTrace = true;
133
134         PolicyConfigException result =
135                 new PolicyConfigException(message, cause, enableSuppression, writableStackTrace);
136
137         // add additional test code here
138         assertNotNull(result);
139         assertEquals("org.onap.policy.api.PolicyConfigException: ", result.toString());
140         assertEquals("", result.getLocalizedMessage());
141         assertEquals("", result.getMessage());
142     }
143
144     /**
145      * Perform pre-test initialization.
146      *
147      * @throws Exception if the initialization fails for some reason
148      *
149      * @generatedBy CodePro at 6/1/16 1:40 PM
150      */
151     @Before
152     public void setUp() throws Exception {
153         // add additional set up code here
154     }
155
156     /**
157      * Perform post-test clean-up.
158      *
159      * @throws Exception if the clean-up fails for some reason
160      *
161      * @generatedBy CodePro at 6/1/16 1:40 PM
162      */
163     @After
164     public void tearDown() throws Exception {
165         // Add additional tear down code here
166     }
167
168     /**
169      * Launch the test.
170      *
171      * @param args the command line arguments
172      *
173      * @generatedBy CodePro at 6/1/16 1:40 PM
174      */
175     public static void main(String[] args) {
176         new org.junit.runner.JUnitCore().run(PolicyConfigExceptionTest.class);
177     }
178 }