* ================================================================================
* 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.
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 {
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 {