|
|
@ -103,7 +103,7 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(dependsOnMethods = "createGroup")
|
|
|
|
@Test(dependsOnMethods = "createGroup")
|
|
|
|
public void updateGroup() throws GroupManagementException, GroupNotExistException {
|
|
|
|
public void updateGroup() throws GroupManagementException, GroupNotExistException, GroupAlreadyExistException {
|
|
|
|
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup1().getName(), false);
|
|
|
|
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup1().getName(), false);
|
|
|
|
deviceGroup.setName(deviceGroup.getName() + "_UPDATED");
|
|
|
|
deviceGroup.setName(deviceGroup.getName() + "_UPDATED");
|
|
|
|
groupManagementProviderService.updateGroup(deviceGroup, deviceGroup.getGroupId());
|
|
|
|
groupManagementProviderService.updateGroup(deviceGroup, deviceGroup.getGroupId());
|
|
|
@ -116,19 +116,19 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
|
|
|
|
|
|
|
|
|
|
|
|
// Rename again to use in different place.
|
|
|
|
// Rename again to use in different place.
|
|
|
|
@Test(dependsOnMethods = "updateGroup")
|
|
|
|
@Test(dependsOnMethods = "updateGroup")
|
|
|
|
public void updateGroupSecondTime() throws GroupManagementException, GroupNotExistException {
|
|
|
|
public void updateGroupSecondTime() throws GroupManagementException, GroupNotExistException, GroupAlreadyExistException {
|
|
|
|
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup1().getName() + "_UPDATED", true);
|
|
|
|
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup1().getName() + "_UPDATED", true);
|
|
|
|
deviceGroup.setName(TestUtils.createDeviceGroup1().getName());
|
|
|
|
deviceGroup.setName(TestUtils.createDeviceGroup1().getName());
|
|
|
|
groupManagementProviderService.updateGroup(deviceGroup, deviceGroup.getGroupId());
|
|
|
|
groupManagementProviderService.updateGroup(deviceGroup, deviceGroup.getGroupId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class, GroupNotExistException.class})
|
|
|
|
@Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class, GroupNotExistException.class, GroupAlreadyExistException.class})
|
|
|
|
public void updateGroupError() throws GroupManagementException, GroupNotExistException {
|
|
|
|
public void updateGroupError() throws GroupManagementException, GroupNotExistException, GroupAlreadyExistException {
|
|
|
|
groupManagementProviderService.updateGroup(null, 1);
|
|
|
|
groupManagementProviderService.updateGroup(null, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class, GroupNotExistException.class})
|
|
|
|
@Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class, GroupNotExistException.class, GroupAlreadyExistException.class})
|
|
|
|
public void updateGroupErrorNotExist() throws GroupManagementException, GroupNotExistException {
|
|
|
|
public void updateGroupErrorNotExist() throws GroupManagementException, GroupNotExistException, GroupAlreadyExistException {
|
|
|
|
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup2().getName(), false);
|
|
|
|
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup2().getName(), false);
|
|
|
|
deviceGroup.setName(deviceGroup.getName() + "_UPDATED");
|
|
|
|
deviceGroup.setName(deviceGroup.getName() + "_UPDATED");
|
|
|
|
groupManagementProviderService.updateGroup(deviceGroup, 6);
|
|
|
|
groupManagementProviderService.updateGroup(deviceGroup, 6);
|
|
|
|