Пример #1
0
        public void SetUp()
        {
            optAssemblyNode = new BranchOptionalAssemblyNode(1, 4);
            parentNode      = new SupportJoinProcNode(-1, 4);
            parentNode.AddChild(optAssemblyNode);

            resultMultipleEvents = supportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 2, 1); // 2 nodes 1 event each for (1)
            resultSingleEvent    = supportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 1, 1); // 1 nodes 1 event each for (1)
        }
Пример #2
0
        public void SetUp()
        {
            _rootCartNodeOneReq = new RootCartProdAssemblyNode(1, 5, false, new int[] { 0, 0, 0, 1, 2 });

            _parentNode = new SupportJoinProcNode(-1, 5);
            _parentNode.AddChild(_rootCartNodeOneReq);

            // add child nodes to indicate what sub-streams to build the cartesian product from
            _rootCartNodeOneReq.AddChild(new SupportJoinProcNode(2, 5));
            _rootCartNodeOneReq.AddChild(new SupportJoinProcNode(3, 5));
            _rootCartNodeOneReq.AddChild(new SupportJoinProcNode(4, 5));
        }
        public void SetUp()
        {
            _optCartNode = new CartesianProdAssemblyNode(1, 4, true, new int[] { 0, 0, 0, 1 });

            _parentNode = new SupportJoinProcNode(-1, 4);
            _parentNode.AddChild(_optCartNode);

            // add child nodes to indicate what sub-streams to build the cartesian product from
            _optCartNode.AddChild(new SupportJoinProcNode(2, 4));
            _optCartNode.AddChild(new SupportJoinProcNode(3, 4));

            _resultMultipleEvents = SupportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 2, 1); // 2 nodes 1 event each for (1)
            _resultSingleEvent    = SupportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 1, 1); // 1 nodes 1 event each for (1)
        }
Пример #4
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]);
        }
Пример #5
0
        public void TestGetSubstreams()
        {
            SupportJoinProcNode top = new SupportJoinProcNode(2, 3);

            SupportJoinProcNode child_1 = new SupportJoinProcNode(5, 3);
            SupportJoinProcNode child_2 = new SupportJoinProcNode(1, 3);

            top.AddChild(child_1);
            top.AddChild(child_2);

            SupportJoinProcNode child_1_1 = new SupportJoinProcNode(6, 3);
            SupportJoinProcNode child_1_2 = new SupportJoinProcNode(7, 3);

            child_1.AddChild(child_1_1);
            child_1.AddChild(child_1_2);

            SupportJoinProcNode child_1_1_1 = new SupportJoinProcNode(0, 3);

            child_1_1.AddChild(child_1_1_1);

            int[] result = top.Substreams;
            EPAssertionUtil.AssertEqualsAnyOrder(new int[] { 2, 5, 1, 6, 7, 0 }, result);
        }
Пример #6
0
 public void TestChildResult(
     BaseAssemblyNode nodeUnderTest,
     SupportJoinProcNode mockParentNode)
 {
     TestChildResult(nodeUnderTest, mockParentNode, supportJoinResultNodeFactory);
 }
Пример #7
0
 public void SetUp()
 {
     _leafNode   = new LeafAssemblyNode(1, 4);
     _parentNode = new SupportJoinProcNode(-1, 4);
     _parentNode.AddChild(_leafNode);
 }
Пример #8
0
 public void SetUp()
 {
     reqNode    = new BranchRequiredAssemblyNode(1, 3);
     parentNode = new SupportJoinProcNode(-1, 3);
     parentNode.AddChild(reqNode);
 }