added test file to test PolicyEngineResponse.java 67/73367/1
authorSandeep J <sandeejh@in.ibm.com>
Thu, 22 Nov 2018 10:39:23 +0000 (16:09 +0530)
committerSandeep J <sandeejh@in.ibm.com>
Thu, 22 Nov 2018 10:40:15 +0000 (16:10 +0530)
to increase code coverage

Issue-ID: CCSDK-552
Change-Id: I18652d1b1644470e0cfa2aa458828ecdcb160d18
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponseTest.java [new file with mode: 0644]

diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponseTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponseTest.java
new file mode 100644 (file)
index 0000000..c6de216
--- /dev/null
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * 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 java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PolicyEngineResponseTest {
+    
+    private PolicyEngineResponse policyEngineResponse;
+    
+    @Before
+    public void setUp()
+    {
+        policyEngineResponse= new PolicyEngineResponse();
+    }
+    
+    @Test
+    public void testGetSetPolicyConfigMessage()
+    {
+        policyEngineResponse.setPolicyConfigMessage("policyConfigMessage");
+        assertEquals("policyConfigMessage", policyEngineResponse.getPolicyConfigMessage());
+    }
+
+    @Test
+    public void testGetSetPolicyConfigStatus()
+    {
+        policyEngineResponse.setPolicyConfigStatus("PolicyConfigStatus");
+        assertEquals("PolicyConfigStatus", policyEngineResponse.getPolicyConfigStatus());
+    }
+
+    @Test
+    public void testGetSetType()
+    {
+        policyEngineResponse.setType("Type");
+        assertEquals("Type", policyEngineResponse.getType());
+    }
+
+    @Test
+    public void testGetSetPolicyName()
+    {
+        policyEngineResponse.setPolicyName("PolicyName");
+        assertEquals("PolicyName", policyEngineResponse.getPolicyName());
+    }
+
+    @Test
+    public void testGetSetPolicyType()
+    {
+        policyEngineResponse.setPolicyType("PolicyType");
+        assertEquals("PolicyType", policyEngineResponse.getPolicyType());
+    }
+    
+    @Test
+    public void testGetSetPolicyVersion()
+    {
+        policyEngineResponse.setPolicyVersion("PolicyVersion");
+        assertEquals("PolicyVersion", policyEngineResponse.getPolicyVersion());
+    }
+    
+    @Test
+    public void testGetSetMatchingConditions()
+    {
+        HashMap<String, String> test= new HashMap<>();
+        policyEngineResponse.setMatchingConditions(test);
+        assertEquals(test, policyEngineResponse.getMatchingConditions());
+    }
+    
+    
+    @Test
+    public void testGetSetResponseAttributes()
+    {
+        HashMap<String, String> test= new HashMap<>();
+        policyEngineResponse.setResponseAttributes(test);
+        assertEquals(test, policyEngineResponse.getResponseAttributes());
+    }
+    
+    @Test
+    public void testGetSetProperty()
+    {
+        policyEngineResponse.setProperty("Property");
+        assertEquals("Property", policyEngineResponse.getProperty());
+    }
+    
+    @Test
+    public void testToString()
+    {
+        assertTrue(policyEngineResponse.toString() instanceof String);
+    }
+    
+    
+}