示例#1
0
        public static void TestChildResult(BaseAssemblyNode nodeUnderTest, SupportJoinProcNode mockParentNode)
        {
            EventBean[] childRow = new EventBean[4];
            childRow[3] = SupportJoinResultNodeFactory.MakeEvent();

            EventBean myEvent = SupportJoinResultNodeFactory.MakeEvent();
            Node      myNode  = SupportJoinResultNodeFactory.MakeNode(3, 1);

            // indicate child result
            List <EventBean[]> resultFinalRows = new List <EventBean[]>();

            nodeUnderTest.Result(childRow, 3, myEvent, myNode, resultFinalRows, null);

            // assert parent node got the row
            Assert.AreEqual(1, mockParentNode.RowsList.Count);
            EventBean[] resultRow = mockParentNode.RowsList[0];

            // assert the node has added his event to the row
            Assert.AreEqual(myEvent, resultRow[1]);
        }
示例#2
0
 /// <summary> Add a child node.</summary>
 /// <param name="childNode">to add
 /// </param>
 public virtual void AddChild(BaseAssemblyNode childNode)
 {
     childNode.ParentNode = this;
     _childNodes.Add(childNode);
 }