Fixing group management test failure

revert-70aa11f8
Madawa Soysa 7 years ago
parent 66a4bb363b
commit 650d87d6ca

@ -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