From f4700adc3b15e04ec53b30e4cd58d5cc00ac38af Mon Sep 17 00:00:00 2001 From: sinthuja Date: Tue, 26 Sep 2017 13:41:32 +0530 Subject: [PATCH] Fixing issues in the device management repository tests. --- .../mgt/core/DeviceManagementRepositoryTests.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepositoryTests.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepositoryTests.java index 925d8a9e8d..d1bf071f25 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepositoryTests.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepositoryTests.java @@ -23,15 +23,22 @@ import org.testng.annotations.Test; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManager; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; +import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; import org.wso2.carbon.device.mgt.core.common.TestDataHolder; +import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; +import org.wso2.carbon.device.mgt.core.task.impl.DeviceTaskManagerServiceImpl; +import org.wso2.carbon.ntask.core.service.TaskService; +import org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl; -public class DeviceManagementRepositoryTests { +public class DeviceManagementRepositoryTests extends BaseDeviceManagementTest{ private DeviceManagementPluginRepository repository; @BeforeClass - public void initRepository() { + @Override + public void init() throws Exception { this.repository = new DeviceManagementPluginRepository(); + DeviceManagementDataHolder.getInstance().setDeviceTaskManagerService(new DeviceTaskManagerServiceImpl()); } @Test