summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-audit
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-03-08 15:31:02 +0530
committerTakamune Cho <takamune.cho@att.com>2019-03-08 15:17:41 +0000
commit062ae7e4f85c058f541330a4e85eb29a4d7e1d48 (patch)
tree084b5530e87799aabf3b1fc796d67108c8b2c634 /appc-config/appc-config-audit
parent3686b0edb3f946044592389e5c62fec4a6da9f4c (diff)
added file to test Parameters.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: I046d1154ce19801cbc18883799f71ec401baa1cb Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-audit')
-rw-r--r--appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestParameters.java84
1 files changed, 84 insertions, 0 deletions
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<String, String> 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());
+ }
+
+}