aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-11-20 23:38:55 +0530
committerSandeep J <sandeejh@in.ibm.com>2018-11-20 23:39:05 +0530
commitff7b3ee5b5b64687f0134b6630dd32422183703c (patch)
tree289e02371dd8faadaf814a9618525ece79c6a344
parent5160246a8bf4cfa54b623a1b2a737b3a9452f653 (diff)
added test file for testing PolicyConfigTest.java
to increase code coverage Issue-ID: CCSDK-552 Change-Id: I21f59675c8f57f3b5114d8a33f5e0f84a85df139 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java113
1 files changed, 113 insertions, 0 deletions
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java
new file mode 100644
index 00000000..cf928ce0
--- /dev/null
+++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+*/
+
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PolicyConfigTest {
+
+ private PolicyConfig policyConfig;
+
+ @Before
+ public void setUp() {
+ policyConfig = new PolicyConfig();
+ }
+
+ @Test
+ public void testGetSetConfigName() {
+ policyConfig.setConfigName("configName");
+ assertEquals("configName", policyConfig.getConfigName());
+ }
+
+ @Test
+ public void testGetSetRiskLevel() {
+ policyConfig.setRiskLevel("RiskLevel");
+ assertEquals("RiskLevel", policyConfig.getRiskLevel());
+ }
+
+ @Test
+ public void testGetSetPolicyName() {
+ policyConfig.setPolicyName("PolicyName");
+ assertEquals("PolicyName", policyConfig.getPolicyName());
+ }
+
+ @Test
+ public void testGetSetPolicyScope() {
+ policyConfig.setPolicyScope("PolicyScope");
+ assertEquals("PolicyScope", policyConfig.getPolicyScope());
+ }
+
+ @Test
+ public void testGetSetGuard() {
+ policyConfig.setGuard("Guard");
+ assertEquals("Guard", policyConfig.getGuard());
+ }
+
+ @Test
+ public void testGetSetDescription() {
+ policyConfig.setDescription("Description");
+ assertEquals("Description", policyConfig.getDescription());
+ }
+
+ @Test
+ public void testGetSetPriority() {
+ policyConfig.setPriority("Priority");
+ assertEquals("Priority", policyConfig.getPriority());
+ }
+
+ @Test
+ public void testGetSetUuid() {
+ policyConfig.setUuid("Uuid");
+ assertEquals("Uuid", policyConfig.getUuid());
+ }
+
+ @Test
+ public void testGetSetVersion() {
+ policyConfig.setVersion("Version");
+ assertEquals("Version", policyConfig.getVersion());
+ }
+
+ @Test
+ public void testGetSetService() {
+ policyConfig.setService("Service");
+ assertEquals("Service", policyConfig.getService());
+ }
+
+ @Test
+ public void testGetSetLocation() {
+ policyConfig.setLocation("Location");
+ assertEquals("Location", policyConfig.getLocation());
+ }
+
+ @Test
+ public void testGetSetTemplateVersion() {
+ policyConfig.setTemplateVersion("TemplateVersion");
+ assertEquals("TemplateVersion", policyConfig.getTemplateVersion());
+ }
+
+ @Test
+ public void testToString()
+ {
+ assertTrue(policyConfig.toString() instanceof String);
+ }
+
+} \ No newline at end of file