diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-11-22 16:09:23 +0530 |
---|---|---|
committer | Sandeep J <sandeejh@in.ibm.com> | 2018-11-22 16:10:15 +0530 |
commit | bde1518add90a10abe541cf8b873554094e68e70 (patch) | |
tree | da10a10de4d69eab00cb9edca9d109b83965acf5 | |
parent | 5a80eff8240087798f05da8bc7340873d6954b8c (diff) |
added test file to test PolicyEngineResponse.java
to increase code coverage
Issue-ID: CCSDK-552
Change-Id: I18652d1b1644470e0cfa2aa458828ecdcb160d18
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/PolicyEngineResponseTest.java | 112 |
1 files changed, 112 insertions, 0 deletions
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 index 00000000..c6de216d --- /dev/null +++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponseTest.java @@ -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); + } + + +} |