/// <summary>
        /// Adds the given action to the list of actions
        /// </summary>
        /// <param name="action"></param>
        public void addExpectation(DataDictionary.Tests.Expectation expectation)
        {
            expectation.Enclosing = Item;
            ExpectationTreeNode expectationNode = new ExpectationTreeNode(expectation);

            Item.appendExpectations(expectation);
            Nodes.Add(expectationNode);
            SortSubNodes();
        }
        /// <summary>
        /// Creates a new expectation
        /// </summary>
        /// <param name="testCase"></param>
        /// <returns></returns>
        public ExpectationTreeNode createExpectation(DataDictionary.Tests.Expectation expectation)
        {
            ExpectationTreeNode retVal = new ExpectationTreeNode(expectation);

            Item.appendExpectations(expectation);
            expectations.Nodes.Add(retVal);

            return(retVal);
        }
Example #3
0
 /// <summary>
 ///     Handles the drop event
 /// </summary>
 /// <param name="sourceNode"></param>
 public override void AcceptDrop(BaseTreeNode sourceNode)
 {
     base.AcceptDrop(sourceNode);
     if (sourceNode is ExpectationTreeNode)
     {
         ExpectationTreeNode expectation = sourceNode as ExpectationTreeNode;
         expectation.Delete();
         Item.appendExpectations(expectation.Item);
     }
 }
 /// <summary>
 /// Handles the drop event
 /// </summary>
 /// <param name="SourceNode"></param>
 public override void AcceptDrop(BaseTreeNode SourceNode)
 {
     base.AcceptDrop(SourceNode);
     if (SourceNode is ExpectationTreeNode)
     {
         ExpectationTreeNode expectation = SourceNode as ExpectationTreeNode;
         expectation.Delete();
         addExpectation(expectation.Item);
     }
 }
 /// <summary>
 /// Handles the drop event
 /// </summary>
 /// <param name="SourceNode"></param>
 public override void AcceptDrop(BaseTreeNode SourceNode)
 {
     base.AcceptDrop(SourceNode);
     if (SourceNode is DataDictionaryView.ActionTreeNode)
     {
         DataDictionaryView.ActionTreeNode action = SourceNode as DataDictionaryView.ActionTreeNode;
         if (action.Parent is ActionsTreeNode)
         {
             createAction(action.Item);
         }
         action.Delete();
     }
     else if (SourceNode is ExpectationTreeNode)
     {
         ExpectationTreeNode expectation = SourceNode as ExpectationTreeNode;
         createExpectation(expectation.Item);
         expectation.Delete();
     }
 }
        /// <summary>
        ///     Handles the drop event
        /// </summary>
        /// <param name="sourceNode"></param>
        public override void AcceptDrop(BaseTreeNode sourceNode)
        {
            base.AcceptDrop(sourceNode);

            ActionTreeNode action = sourceNode as ActionTreeNode;

            if (action != null)
            {
                action.Delete();
                Item.appendActions(action.Item);
            }

            ExpectationTreeNode expectation = sourceNode as ExpectationTreeNode;

            if (expectation != null)
            {
                expectation.Delete();
                Item.appendExpectations(expectation.Item);
            }
        }