summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main
diff options
context:
space:
mode:
authorMichal Kabaj <michal.kabaj@nokia.com>2018-03-05 13:42:17 +0100
committerPatrick Brady <pb071s@att.com>2018-03-06 17:11:29 +0000
commitcaece93b98a0c7ad1ae762ff1f29571e1bca8e0f (patch)
tree032919c6f5030cc369d18f0bd89291a732b98516 /appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main
parente5d914ebeabeb375a56744221fbbff9b6ec996ff (diff)
ChefAdapterImpl JUnits
-Added unit testcases for retrieveData method - extracted new test class -Added unit test for combineStrings method Change-Id: I8adcc9d2dc17e4ebf305fc2a8139095d5841a445 Issue-ID: APPC-437 Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com>
Diffstat (limited to 'appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main')
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java
index 69b57f7ce..4a4081e5c 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java
@@ -416,10 +416,7 @@ public class ChefAdapterImpl implements ChefAdapter {
JSONObject jsonConfig = new JSONObject(allConfigData);
String contextData = fetchContextData(key, jsonConfig);
- RequestContext rc = new RequestContext(ctx);
- rc.isAlive();
- SvcLogicContext svcLogic = rc.getSvcLogicContext();
- svcLogic.setAttribute(dgContext, contextData);
+ ctx.setAttribute(dgContext, contextData);
}
private String fetchContextData(String key, JSONObject jsonConfig) {
@@ -443,10 +440,7 @@ public class ChefAdapterImpl implements ChefAdapter {
String string2 = params.get("String2");
String dgContext = params.get("dgContext");
String contextData = string1 + string2;
- RequestContext rc = new RequestContext(ctx);
- rc.isAlive();
- SvcLogicContext svcLogic = rc.getSvcLogicContext();
- svcLogic.setAttribute(dgContext, contextData);
+ ctx.setAttribute(dgContext, contextData);
}
/**