summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-28 13:02:05 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-28 13:02:05 +0000
commit1206747be101c4250d53ca289853ca88904bc048 (patch)
tree86cc7e8725e3683faf6f206dbb31fdbf1765d291
parentfc9cebcc637105f3ed2aecb857ec38e8c045e77a (diff)
parenta12faac8e7133f354050cf9b7990f8b35d022d01 (diff)
Merge "Implement test cases for fabric discovery plugin"
-rw-r--r--fabric-discovery-plugin/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/fabricdiscovery/TestFabricDiscoveryPlugin.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/fabric-discovery-plugin/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/fabricdiscovery/TestFabricDiscoveryPlugin.java b/fabric-discovery-plugin/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/fabricdiscovery/TestFabricDiscoveryPlugin.java
index ac0461889..7a25e77be 100644
--- a/fabric-discovery-plugin/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/fabricdiscovery/TestFabricDiscoveryPlugin.java
+++ b/fabric-discovery-plugin/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/fabricdiscovery/TestFabricDiscoveryPlugin.java
@@ -55,4 +55,25 @@ public class TestFabricDiscoveryPlugin {
}
}
+ @Test
+ public void validateParameterEnableFailure() throws Exception {
+ SvcLogicContext ctx = new SvcLogicContext();
+ String stream = C_STREAM;
+ final String W_ENABLE_STR = "bad enable parameter";
+
+ Map<String, String> p = new HashMap<>();
+ p.put("stream", stream);
+ p.put("enable", W_ENABLE_STR);
+
+ FabricDiscoveryPlugin fdp = new FabricDiscoveryPlugin();
+ try {
+ fdp.processDcNotificationStream(p, ctx);
+ LOG.info("Connection to Stream:{} succeeded.", stream);
+ } catch (Exception e) {
+ LOG.info("Received Exception while connecting to Fabric Discovery notification server: {}", e.getMessage());
+ } finally {
+ Assert.assertEquals("Failure", ctx.getAttribute(FB_DISCOVERY_STATUS));
+ }
+ }
+
}