From 6aba996065b1b2e40ec4d5e6802da67aca6c67eb Mon Sep 17 00:00:00 2001 From: GDLMadushanka Date: Fri, 13 Oct 2017 16:28:45 +0530 Subject: [PATCH] required changes for pr --- .../device/mgt/core/cache/DeviceCacheManagerImplTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 e77d9c7cc8..dfd5aa2d59 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 @@ -33,7 +33,6 @@ import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig; import org.wso2.carbon.device.mgt.core.config.cache.DeviceCacheConfiguration; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; - import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -100,14 +99,15 @@ public class DeviceCacheManagerImplTest extends BaseDeviceManagementTest { 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); + Assert.assertEquals(tempDevice.getName(), UPDATE_NAME,"Device name not updated in the cache"); } @Test(description = "test getting a device from cache", dependsOnMethods = {"testAddDeviceToCache"}) public void testGetDeviceFromCache() throws DeviceManagementException { Device tempDevice = deviceCacheManager.getDeviceFromCache(deviceIds.get(1), MultitenantConstants .SUPER_TENANT_ID); - Assert.assertEquals(tempDevice, devices.get(1)); + Assert.assertEquals(tempDevice, devices.get(1),"Received device from cache is not matching " + + "with the saved device"); } @Test(description = "test removing a device from cache", dependsOnMethods = {"testUpdateDeviceInCache"})