1 package jtest.org.onap.ccsdk.sli.plugins.fabricdiscovery;
3 import java.util.HashMap;
5 import org.junit.Assert;
7 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
8 import org.onap.ccsdk.sli.plugins.fabricdiscovery.FabricDiscoveryPlugin;
9 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory;
13 * Created by arun on 9/18/17.
16 public class TestFabricDiscoveryPlugin {
17 private static final Logger LOG = LoggerFactory.getLogger(TestFabricDiscoveryPlugin.class);
18 private static final String C_STREAM =
19 "ws://localhost:8185/data-change-event-subscription/network-topology:network-topology/datastore=CONFIGURATION/scope=BASE";
20 private final String FB_DISCOVERY_STATUS = "fb-response";
23 public void connectToNotificationServerSuccess() throws Exception {
24 SvcLogicContext ctx = new SvcLogicContext();
25 String stream = C_STREAM;
27 Map<String, String> p = new HashMap<String, String>();
28 p.put("stream", stream);
29 p.put("enable", "true");
31 FabricDiscoveryPlugin fdp = new FabricDiscoveryPlugin();
32 fdp.processDcNotificationStream(p, ctx);
33 Assert.assertEquals("Success", ctx.getAttribute(FB_DISCOVERY_STATUS));