[POLICY-122] Policy GUI Fixes
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / openecomp / policy / test / PolicyConfigStatusTest.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.openecomp.policy.test;
22
23 import org.junit.*;
24 import org.openecomp.policy.api.PolicyConfigStatus;
25
26 import static org.junit.Assert.*;
27
28 /**
29  * The class <code>PolicyConfigStatusTest</code> contains tests for the class <code>{@link PolicyConfigStatus}</code>.
30  *
31  * @generatedBy CodePro at 6/1/16 1:41 PM
32  * @version $Revision: 1.0 $
33  */
34 public class PolicyConfigStatusTest {
35         /**
36          * Run the PolicyConfigStatus 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 configStatus = "";
46
47                 PolicyConfigStatus result = PolicyConfigStatus.getStatus(configStatus);
48
49                 // add additional test code here
50                 assertNotNull(result);
51                 assertEquals("not_found", result.toString());
52                 assertEquals("CONFIG_NOT_FOUND", result.name());
53                 assertEquals(1, result.ordinal());
54         }
55
56         /**
57          * Run the PolicyConfigStatus 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 configStatus = "";
67
68                 PolicyConfigStatus result = PolicyConfigStatus.getStatus(configStatus);
69
70                 // add additional test code here
71                 assertNotNull(result);
72                 assertEquals("not_found", result.toString());
73                 assertEquals("CONFIG_NOT_FOUND", result.name());
74                 assertEquals(1, result.ordinal());
75         }
76
77         /**
78          * Run the String toString() method test.
79          *
80          * @throws Exception
81          *
82          * @generatedBy CodePro at 6/1/16 1:41 PM
83          */
84         @Test
85         public void testToString_1()
86                 throws Exception {
87                 PolicyConfigStatus fixture = PolicyConfigStatus.CONFIG_NOT_FOUND;
88
89                 String result = fixture.toString();
90
91                 // add additional test code here
92                 assertEquals("not_found", result);
93         }
94
95         /**
96          * Perform pre-test initialization.
97          *
98          * @throws Exception
99          *         if the initialization fails for some reason
100          *
101          * @generatedBy CodePro at 6/1/16 1:41 PM
102          */
103         @Before
104         public void setUp()
105                 throws Exception {
106                 // add additional set up code here
107         }
108
109         /**
110          * Perform post-test clean-up.
111          *
112          * @throws Exception
113          *         if the clean-up fails for some reason
114          *
115          * @generatedBy CodePro at 6/1/16 1:41 PM
116          */
117         @After
118         public void tearDown()
119                 throws Exception {
120                 // Add additional tear down code here
121         }
122
123         /**
124          * Launch the test.
125          *
126          * @param args the command line arguments
127          *
128          * @generatedBy CodePro at 6/1/16 1:41 PM
129          */
130         public static void main(String[] args) {
131                 new org.junit.runner.JUnitCore().run(PolicyConfigStatusTest.class);
132         }
133 }