Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        public IOperation GetOperation(string name)
        {
            var op = LookupOperation(name);

            return(op ?? meta.GetOperation(Token + "." + name));
        }
 protected IOperation Operation(string token)
 {
     return(Meta.GetOperation(token));
 }