Merge pull request #1014 from madawas/master

Fixing group management test failure
4.x.x
Ruwan 7 years ago committed by GitHub
commit 4506b31387

@ -22,6 +22,7 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.GroupPaginationRequest;
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup;
import org.wso2.carbon.device.mgt.core.common.TestDataHolder;
import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder;
import org.wso2.carbon.registry.core.config.RegistryContext;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
@ -108,7 +109,7 @@ public class TestUtils {
public static List<DeviceIdentifier> getDeviceIdentifiersList(){
DeviceIdentifier identifier = new DeviceIdentifier();
identifier.setId("12345");
identifier.setType("Test");
identifier.setType(TestDataHolder.TEST_DEVICE_TYPE);
List<DeviceIdentifier> list = new ArrayList<>();
list.add(identifier);

@ -27,6 +27,7 @@ import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.group.mgt.*;
import org.wso2.carbon.device.mgt.core.TestUtils;
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.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.cache.DeviceCacheConfiguration;
import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOFactory;
@ -266,7 +267,7 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
public void getGroupsByDeviceIdentifier() throws GroupManagementException {
DeviceIdentifier identifier = new DeviceIdentifier();
identifier.setId("12345");
identifier.setType("Test");
identifier.setType(TestDataHolder.TEST_DEVICE_TYPE);
List<DeviceGroup> groups = groupManagementProviderService.getGroups(identifier);
Assert.assertNotNull(groups);
}

Loading…
Cancel
Save