summaryrefslogtreecommitdiffstats
path: root/appc-config
diff options
context:
space:
mode:
Diffstat (limited to 'appc-config')
-rw-r--r--appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java17
1 files changed, 16 insertions, 1 deletions
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 c1f66f2fb..848632b31 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,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.
@@ -31,6 +31,7 @@ import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.onap.sdnc.config.generator.ConfigGeneratorConstant;
public class TestPatternNode {
@@ -50,6 +51,20 @@ public class TestPatternNode {
ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS);
}
+
+ @Test(expected= SvcLogicException.class)
+ public void testParseErrorLogForEmptyLogData() throws Exception {
+ PatternNode patternNode = new PatternNode();
+ Map<String, String> inParams = new HashMap<String, String>();
+ inParams.put(ConfigGeneratorConstant.INPUT_PARAM_RESPONSE_PRIFIX, "test");
+ String logData = IOUtils.toString(
+ TestPatternNode.class.getClassLoader().getResourceAsStream("pattern/errorlog.txt"),
+ ConfigGeneratorConstant.STRING_ENCODING);
+ SvcLogicContext ctx = new SvcLogicContext();
+ patternNode.parseErrorLog(inParams, ctx);
+
+ }
+
// @Test(expected=Exception.class)
public void checkXMLData() throws Exception {