From 87362a739a8df45e42daf61aff0dd9e3a55e8990 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 27 Nov 2018 17:23:34 +0530 Subject: added test case to TestXSLTTransformerNode to increase code coverage Issue-ID: APPC-1086 Change-Id: I4e185d1c1117f0bab6a63618621b55aef376a2c9 Signed-off-by: Sandeep J --- .../config/generator/transform/TestXSLTTransformerNode.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'appc-config') 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 inParams = new HashMap(); + 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); + } } -- cgit 1.2.3-korg