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