From 0475ae9e3a13e4a67554bc0878a1ace3cd9f4fd0 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Tue, 10 Oct 2017 23:37:15 +0530 Subject: [PATCH] adding class and test case comments. --- .../publisher/DataPublisherServiceComponentTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/test/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DataPublisherServiceComponentTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/test/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DataPublisherServiceComponentTest.java index 74f9762669..5449d6f489 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/test/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DataPublisherServiceComponentTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/test/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DataPublisherServiceComponentTest.java @@ -28,6 +28,9 @@ import org.wso2.carbon.device.mgt.analytics.data.publisher.util.TestComponentCon import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +/** + * This tesclass will be validating the behaviour of {@link DataPublisherServiceComponent} + */ public class DataPublisherServiceComponentTest extends BaseAnalyticsDataPublisherTest { private DataPublisherServiceComponent serviceComponent; @@ -36,17 +39,17 @@ public class DataPublisherServiceComponentTest extends BaseAnalyticsDataPublishe this.serviceComponent = new DataPublisherServiceComponent(); } - @Test + @Test (description = "Test bundle activation with exception thrown when service resgistration") public void activateWithException() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { this.activate(new TestComponentContext()); } - @Test(dependsOnMethods = "activateWithException") + @Test(dependsOnMethods = "activateWithException", description = "Test the bundle activation with succesful path") public void activateWithoutException() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { this.activate(MockOsgi.newComponentContext()); } - @Test(dependsOnMethods = "activateWithoutException") + @Test(dependsOnMethods = "activateWithoutException", description = "Test bundle deactivation") public void deActivate() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method method = this.serviceComponent.getClass().getDeclaredMethod("deactivate", ComponentContext.class); method.setAccessible(true);