summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-generator/provider/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'appc-config/appc-config-generator/provider/src/test')
-rw-r--r--appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/transform/TestXSLTTransformerNode.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/transform/TestXSLTTransformerNode.java b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/transform/TestXSLTTransformerNode.java
index 65214b886..b9aa20f52 100644
--- a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/transform/TestXSLTTransformerNode.java
+++ b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/transform/TestXSLTTransformerNode.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
@@ -33,6 +35,7 @@ import org.onap.sdnc.config.generator.ConfigGeneratorConstant;
import org.onap.sdnc.config.generator.merge.TestMergeNode;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
public class TestXSLTTransformerNode {
@@ -57,5 +60,20 @@ public class TestXSLTTransformerNode {
+ ctx.getAttribute(ConfigGeneratorConstant.OUTPUT_PARAM_TRANSFORMED_DATA));
}
-
+ @Test(expected=SvcLogicException.class)
+ public void testTransformDataForEmptyTemplateData() throws Exception {
+ SvcLogicContext ctx = new SvcLogicContext();
+ Map<String, String> inParams = new HashMap<String, String>();
+ inParams.put(ConfigGeneratorConstant.INPUT_PARAM_REQUEST_DATA, "testRequestData");
+ XSLTTransformerNode transformerNode = new XSLTTransformerNode();
+ transformerNode.transformData(inParams, ctx);
+ }
+ @Test(expected=SvcLogicException.class)
+ public void testTransformDataForEmptyRequestData() throws Exception {
+ SvcLogicContext ctx = new SvcLogicContext();
+ Map<String, String> inParams = new HashMap<String, String>();
+ XSLTTransformerNode transformerNode = new XSLTTransformerNode();
+ inParams.put(ConfigGeneratorConstant.INPUT_PARAM_TEMPLATE_DATA, "testTemplateData");
+ transformerNode.transformData(inParams, ctx);
+ }
}