Reformat PolicyEngineAPI test cases
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / onap / policy / test / PolicyConfigTypeTest.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.PolicyConfigType;
27 import static org.junit.Assert.*;
28
29 /**
30  * The class <code>PolicyConfigTypeTest</code> contains tests for the class
31  * <code>{@link PolicyConfigType}</code>.
32  *
33  * @generatedBy CodePro at 6/1/16 1:41 PM
34  * @version $Revision: 1.0 $
35  */
36 public class PolicyConfigTypeTest {
37     /**
38      * Run the String toString() method test.
39      *
40      * @throws Exception
41      *
42      * @generatedBy CodePro at 6/1/16 1:41 PM
43      */
44     @Test
45     public void testToString_1() throws Exception {
46         PolicyConfigType fixture = PolicyConfigType.BRMS_PARAM;
47
48         String result = fixture.toString();
49
50         // add additional test code here
51         assertEquals("BRMS_Param", result);
52
53         assertEquals(PolicyConfigType.MicroService,
54                 PolicyConfigType.create(PolicyConfigType.MicroService.name()));
55     }
56
57     @Test(expected = IllegalArgumentException.class)
58     public void testException() {
59         PolicyConfigType.create("foobar");
60     }
61
62     /**
63      * Perform pre-test initialization.
64      *
65      * @throws Exception if the initialization fails for some reason
66      *
67      * @generatedBy CodePro at 6/1/16 1:41 PM
68      */
69     @Before
70     public void setUp() throws Exception {
71         // add additional set up code here
72     }
73
74     /**
75      * Perform post-test clean-up.
76      *
77      * @throws Exception if the clean-up fails for some reason
78      *
79      * @generatedBy CodePro at 6/1/16 1:41 PM
80      */
81     @After
82     public void tearDown() throws Exception {
83         // Add additional tear down code here
84     }
85
86     /**
87      * Launch the test.
88      *
89      * @param args the command line arguments
90      *
91      * @generatedBy CodePro at 6/1/16 1:41 PM
92      */
93     public static void main(String[] args) {
94         new org.junit.runner.JUnitCore().run(PolicyConfigTypeTest.class);
95     }
96 }