From 062ae7e4f85c058f541330a4e85eb29a4d7e1d48 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 8 Mar 2019 15:31:02 +0530 Subject: added file to test Parameters.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I046d1154ce19801cbc18883799f71ec401baa1cb Signed-off-by: Sandeep J --- .../sdnc/config/audit/node/TestParameters.java | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestParameters.java (limited to 'appc-config') diff --git a/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestParameters.java b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestParameters.java new file mode 100644 index 000000000..5c3b8d8d8 --- /dev/null +++ b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestParameters.java @@ -0,0 +1,84 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2019 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. + * + * ============LICENSE_END========================================================= + */ + +package org.onap.sdnc.config.audit.node; + +import static org.junit.Assert.assertEquals; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; + +public class TestParameters { + private Parameters parameters; + + @Before + public void setUp() { + Map inParams = new HashMap<>(); + inParams.put("compareType", "testcompareType"); + inParams.put("compareDataType", "testcompareDataType"); + inParams.put("sourceData", "testsourceData"); + inParams.put("targetData", "testtargetData"); + inParams.put("sourceDataType", "testsourceDataType"); + inParams.put("targetDataType", "testtargetDataType"); + inParams.put("requestIdentifier", "testrequestIdentifier"); + parameters = new Parameters(inParams); + } + + @Test + public void testPayloadX() { + parameters.setPayloadX("PayloadX"); + assertEquals("PayloadX", parameters.getPayloadX()); + } + + @Test + public void testPayloadXtype() { + parameters.setPayloadXtype("PayloadXtype"); + assertEquals("PayloadXtype", parameters.getPayloadXtype()); + } + + @Test + public void testPayloadY() { + parameters.setPayloadY("PayloadY"); + assertEquals("PayloadY", parameters.getPayloadY()); + } + + @Test + public void testPayloadYtype() { + parameters.setPayloadYtype("PayloadYtype"); + assertEquals("PayloadYtype", parameters.getPayloadYtype()); + } + + @Test + public void testCompareDataType() { + parameters.setCompareDataType("CompareDataType"); + assertEquals("CompareDataType", parameters.getCompareDataType()); + } + + @Test + public void testCompareType() { + parameters.setCompareType("CompareType"); + assertEquals("CompareType", parameters.getCompareType()); + } + +} -- cgit 1.2.3-korg