* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * 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.
* You may obtain a copy of the License at
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
+import static org.junit.Assert.assertEquals;
public class TestCompareNodeCli {
private static final Logger log = LoggerFactory.getLogger(TestCompareNodeCli.class);
cmp.compare(testMap, ctx);
assert (ctx.getAttribute("STATUS").equals("SUCCESS"));
}
+
+ @Test
+ public void TestCompareCliForNoPayload() throws SvcLogicException {
+ SvcLogicContext ctx = new SvcLogicContext();
+ HashMap<String, String> testMap = new HashMap<String, String>();
+ CompareNode cmp = new CompareNode();
+ testMap.put("compareDataType", "Cli");
+ cmp.compare(testMap, ctx);
+ assertEquals ("FAILURE",ctx.getAttribute("STATUS"));
+ }
@Test
public void TestCompareCliFordifferentPayload() throws SvcLogicException {