cf928ce07728dcea8e87762e3c4ee16733503d46
[ccsdk/apps.git] /
1 /*******************************************************************************
2  * Copyright © 2018 IBM.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************
16 */
17
18 package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
19
20 import static org.junit.Assert.assertEquals;
21 import static org.junit.Assert.assertTrue;
22
23 import org.junit.Before;
24 import org.junit.Test;
25
26 public class PolicyConfigTest {
27
28     private PolicyConfig policyConfig;
29
30     @Before
31     public void setUp() {
32         policyConfig = new PolicyConfig();
33     }
34
35     @Test
36     public void testGetSetConfigName() {
37         policyConfig.setConfigName("configName");
38         assertEquals("configName", policyConfig.getConfigName());
39     }
40
41     @Test
42     public void testGetSetRiskLevel() {
43         policyConfig.setRiskLevel("RiskLevel");
44         assertEquals("RiskLevel", policyConfig.getRiskLevel());
45     }
46
47     @Test
48     public void testGetSetPolicyName() {
49         policyConfig.setPolicyName("PolicyName");
50         assertEquals("PolicyName", policyConfig.getPolicyName());
51     }
52
53     @Test
54     public void testGetSetPolicyScope() {
55         policyConfig.setPolicyScope("PolicyScope");
56         assertEquals("PolicyScope", policyConfig.getPolicyScope());
57     }
58
59     @Test
60     public void testGetSetGuard() {
61         policyConfig.setGuard("Guard");
62         assertEquals("Guard", policyConfig.getGuard());
63     }
64     
65     @Test
66     public void testGetSetDescription() {
67         policyConfig.setDescription("Description");
68         assertEquals("Description", policyConfig.getDescription());
69     }
70     
71     @Test
72     public void testGetSetPriority() {
73         policyConfig.setPriority("Priority");
74         assertEquals("Priority", policyConfig.getPriority());
75     }
76     
77     @Test
78     public void testGetSetUuid() {
79         policyConfig.setUuid("Uuid");
80         assertEquals("Uuid", policyConfig.getUuid());
81     }
82     
83     @Test
84     public void testGetSetVersion() {
85         policyConfig.setVersion("Version");
86         assertEquals("Version", policyConfig.getVersion());
87     }
88     
89     @Test
90     public void testGetSetService() {
91         policyConfig.setService("Service");
92         assertEquals("Service", policyConfig.getService());
93     }
94      
95     @Test
96     public void testGetSetLocation() {
97         policyConfig.setLocation("Location");
98         assertEquals("Location", policyConfig.getLocation());
99     }
100     
101     @Test
102     public void testGetSetTemplateVersion() {
103         policyConfig.setTemplateVersion("TemplateVersion");
104         assertEquals("TemplateVersion", policyConfig.getTemplateVersion());
105     }
106     
107     @Test
108     public void testToString()
109     {
110         assertTrue(policyConfig.toString() instanceof String);
111     }
112
113 }