protected void DoRemoveAddedGroups() { //TODO: get the group with _testGroupName and remove it when found instead of using _newGroups foreach (long id in _autoRemoveGroups) { var req = GroupRequestFactory.CreateDeleteGroupRequest(id); RequestHandler.ExecuteSuccessfully <DataspaceResponse>(req); } _autoRemoveGroups.Clear(); }
public void RemoveGroup(bool globalGroup) { var req = GroupRequestFactory.CreateAddGroupRequest(_testGroupName, globalGroup); var groupResponse = RequestHandler.Execute <ObjectResponse <NamedObject> >(req); Assert.True(groupResponse.Success, "Group was not even added"); req = GroupRequestFactory.CreateDeleteGroupRequest(groupResponse.Data.Id); var response = RequestHandler.Execute <DataspaceResponse>(req); Assert.True(response.Success, response.Message); }
protected override void ProcessRecord() { foreach (var curId in Id) { try { var request = GroupRequestFactory.CreateDeleteGroupRequest(curId); if (ShouldProcess(curId.ToString())) { RequestHandler.ExecuteSuccessfully(request); } } catch (ReportableException e) { WriteError(e.ErrorRecord); } } }