diff options
author | surya-huawei <a.u.surya@huawei.com> | 2017-10-05 15:20:33 +0530 |
---|---|---|
committer | surya-huawei <a.u.surya@huawei.com> | 2017-10-05 15:24:01 +0530 |
commit | 905f1d2016e8bc4d02a801017a31b20c4eb2119e (patch) | |
tree | d95b6b4c68532fd2b20360fd8826c4ce67d1cfcd | |
parent | 70eb2ae5c2f87511a34aeab170b13a7d3bdae66a (diff) |
Add a test for SdncJsonDmaapConsumer
*Add a unit test in sli/northbound module
This Test checks whether an InvalidMessageException is
thrown when null is passed to processMsg method
Issue-Id: CCSDK-106
Change-Id: I52327377f4582d8c24cef87f0360b977f2f216fc
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
-rw-r--r-- | dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java new file mode 100644 index 000000000..0d65231da --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import org.junit.Test; + +public class TestSdncJsonDmaapConsumer { + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String DMAAP_LISTENER_PROPERTIES_DIR = "src/test/resources"; + + @Test(expected = InvalidMessageException.class) + public void testProcessMsg_shouldThrowException() throws Exception { + SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); + consumer.processMsg(null); + } +} |