From 0a1ba593079bf8203cd25da59488e5144d9a1925 Mon Sep 17 00:00:00 2001 From: GDLMadushanka Date: Fri, 13 Oct 2017 16:10:00 +0530 Subject: [PATCH] refactoring --- .../device/mgt/core/cache/DeviceCacheManagerImplTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/cache/DeviceCacheManagerImplTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/cache/DeviceCacheManagerImplTest.java index 8a19b6e780d..e77d9c7cc8b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/cache/DeviceCacheManagerImplTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/cache/DeviceCacheManagerImplTest.java @@ -39,12 +39,10 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; - /* Unit tests for deviceCacheManagerImpl */ public class DeviceCacheManagerImplTest extends BaseDeviceManagementTest { - private static final int NO_OF_DEVICES = 5; private static final String UPDATE_NAME = "updatedName"; private static final String DEVICE_TYPE = "TEST_TYPE"; @@ -95,11 +93,11 @@ public class DeviceCacheManagerImplTest extends BaseDeviceManagementTest { deviceCacheManager.addDeviceToCache(deviceIds.get(0), devices.get(0), MultitenantConstants.SUPER_TENANT_ID); } - @Test(description = "test updating and getting a device in Cache", dependsOnMethods = {"testAddExistingDeviceToCache"}) + @Test(description = "test updating and getting a device in Cache", + dependsOnMethods = {"testAddExistingDeviceToCache"}) public void testUpdateDeviceInCache() { devices.get(0).setName(UPDATE_NAME); deviceCacheManager.updateDeviceInCache(deviceIds.get(0), devices.get(0), MultitenantConstants.SUPER_TENANT_ID); - Device tempDevice = deviceCacheManager.getDeviceFromCache(deviceIds.get(0), MultitenantConstants .SUPER_TENANT_ID); Assert.assertEquals(tempDevice.getName(), UPDATE_NAME);