public void TestDeleteAnAsset() { var newStory = CreatesAnAsset("AssetTests: Delete an asset"); var deleteOperation = _metaModel.GetOperation("Story.Delete"); var deletedId = _services.ExecuteOperation(deleteOperation, newStory.Oid); Assert.AreEqual(0, Query(deletedId, null).TotalAvaliable); }
private void DeactivateVersionOneMember(User user) { string username = user.Username; try { IOperation inactivateMember = _model.GetOperation(V1Constants.INACTIVATE); Oid deactivatedOid = _services.ExecuteOperation(inactivateMember, user.V1MemberAsset.Oid); logger.Info("Member with username '" + username + "' has been DEACTIVATED in the VersionOne system."); } catch (Exception ex) { logger.ErrorException( "Attempt to deactivate Member with username '" + username + "' in the VersionOne system has FAILED.", ex); } }
public IOperation GetOperation(string name) { var op = LookupOperation(name); return(op ?? meta.GetOperation(Token + "." + name)); }
protected IOperation Operation(string token) { return(Meta.GetOperation(token)); }