diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-11-27 17:23:34 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2018-11-28 01:44:44 +0000 |
commit | 87362a739a8df45e42daf61aff0dd9e3a55e8990 (patch) | |
tree | 08e850288cf618af77430f4efb2d0b635c12db08 /appc-config/appc-config-generator/provider | |
parent | f4b355eb2aa690ef37a66d76f6849a8828af0489 (diff) |
added test case to TestXSLTTransformerNode
to increase code coverage
Issue-ID: APPC-1086
Change-Id: I4e185d1c1117f0bab6a63618621b55aef376a2c9
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-generator/provider')
-rw-r--r-- | appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/transform/TestXSLTTransformerNode.java | 12 |
1 files changed, 11 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 b9aa20f52..0c6e77f4b 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,7 +6,7 @@ * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= - * Modification Copyright (C) 2018 IBM. + * Modifications 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. @@ -76,4 +76,14 @@ public class TestXSLTTransformerNode { inParams.put(ConfigGeneratorConstant.INPUT_PARAM_TEMPLATE_DATA, "testTemplateData"); transformerNode.transformData(inParams, ctx); } + + @Test(expected=SvcLogicException.class) + public void testTransformDataForEmptyRequestTemplate() 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"); + inParams.put(ConfigGeneratorConstant.INPUT_PARAM_TEMPLATE_FILE, "NO_SUCH_FILE.json"); + transformerNode.transformData(inParams, ctx); + } } |