예제 #1
0
 public void Delete_throws(
     [Values] ItemType itemType,
     [Values(null, "", " ")] string name
     )
 {
     Assert.That(() => _commands.Delete(itemType, name), Throws.ArgumentException);
 }
예제 #2
0
        public bool Delete()
        {
            var canDelete = stateCommands.Delete();

            if (canDelete)
            {
                WorkItemStorage.items.Remove(this);
            }
            return(canDelete);
        }
예제 #3
0
        public bool Delete()
        {
            bool canDelete = stateCommands.Delete();

            if (canDelete)
            {
                unitOfWork.Entities.Remove(this);
            }
            return(canDelete);
        }
예제 #4
0
        public bool Delete()
        {
            bool canDelete = _stateCommands.Delete();

            if (canDelete)
            {
                Console.WriteLine("Work item deleted!");
            }

            return(canDelete);
        }
        public void DeleteUnits(DeleteRequest deleteRequest)
        {
            try
            {
                _loginQuery.IsAuthenticated(deleteRequest.Ticket);

                _commands.Delete <Unit>(deleteRequest.Id);
            }
            catch (SecurityException e)
            {
                throw new FaultException <SecurityException>(e);
            }
            catch (Exception e)
            {
                throw new FaultException(e.Message);
            }
        }