From: Sandeep J Date: Wed, 8 Aug 2018 12:09:08 +0000 (+0530) Subject: added test case to TestPatternNode.java X-Git-Tag: 1.4.0~115 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=fbea05903ae752ec6eefec5fdf32f6b3144e66c1;p=appc.git added test case to TestPatternNode.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I4d035ffb81367fd4de4004d4aefa8a6433e4fd7d Signed-off-by: Sandeep J --- diff --git a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java index 9b94e627d..c1f66f2fb 100644 --- a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java +++ b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java @@ -6,6 +6,8 @@ * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= + * Modification Copyright (C) 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 @@ -94,4 +96,15 @@ public class TestPatternNode { assertEquals(ctx.getAttribute("test." + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS), ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS); } + + @Test + public void testCheckDataType() throws Exception { + PatternNode patternNode = new PatternNode(); + Map inParams = new HashMap(); + inParams.put(ConfigGeneratorConstant.INPUT_PARAM_RESPONSE_PRIFIX, "test"); + inParams.put(ConfigGeneratorConstant.INPUT_PARAM_CHECK_DATA, "testData"); + SvcLogicContext ctx = new SvcLogicContext(); + patternNode.checkDataType(inParams, ctx); + assertEquals(ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS,ctx.getAttribute("test." + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS)); + } }