public static void TestChildResult( BaseAssemblyNode nodeUnderTest, SupportJoinProcNode mockParentNode, SupportJoinResultNodeFactory supportJoinResultNodeFactory) { EventBean[] childRow = new EventBean[4]; childRow[3] = supportJoinResultNodeFactory.MakeEvent(); EventBean myEvent = supportJoinResultNodeFactory.MakeEvent(); Node myNode = supportJoinResultNodeFactory.MakeNode(3, 1); // indicate child result IList <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]); }
private static IList <EventBean[]> MakeRows(int numRows, int[] substreamsPopulated) { IList <EventBean[]> result = new List <EventBean[]>(); for (int i = 0; i < numRows; i++) { var row = new EventBean[NUM_COL]; for (int j = 0; j < substreamsPopulated.Length; j++) { int index = substreamsPopulated[j]; row[index] = SupportJoinResultNodeFactory.MakeEvent(); } result.Add(row); } return(result); }