Beispiel #1
0
        private void RunAssertionTwo(String expression)
        {
            EPStatement stmt = _epService.EPAdministrator.CreateEPL(expression);

            _listener    = new SupportUpdateListener();
            stmt.Events += _listener.Update;

            String[] fields = "id,valh0,valh1".Split(',');
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);

            SendBeanInt("E1", 1, 1);
            EPAssertionUtil.AssertPropsPerRow(_listener.GetAndResetLastNewData(), fields, new Object[][] { new Object[] { "E1", "H01", "H011" } });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, new Object[][] { new Object[] { "E1", "H01", "H011" } });

            SendBeanInt("E2", 0, 1);
            EPAssertionUtil.AssertPropsPerRow(_listener.GetAndResetLastNewData(), fields, null);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, new Object[][] { new Object[] { "E1", "H01", "H011" } });

            SendBeanInt("E3", 1, 0);
            EPAssertionUtil.AssertPropsPerRow(_listener.GetAndResetLastNewData(), fields, null);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, new Object[][] { new Object[] { "E1", "H01", "H011" } });

            SendBeanInt("E4", 2, 2);
            Object[][] result = { new Object[] { "E4", "H01", "H011" }, new Object[] { "E4", "H01", "H012" }, new Object[] { "E4", "H02", "H021" }, new Object[] { "E4", "H02", "H022" } };
            EPAssertionUtil.AssertPropsPerRow(_listener.GetAndResetLastNewData(), fields, result);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(result, new Object[][] { new Object[] { "E1", "H01", "H011" } }));
        }
        private void TryAssertionOne(EPServiceProvider epService, string expression)
        {
            EPStatement stmt     = epService.EPAdministrator.CreateEPL(expression);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            string[] fields = "id,valh0,valh1".Split(',');
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);

            SendBeanInt(epService, "E1", 0, 0, 0, 0, 1, 1);
            var resultOne = new object[][] { new object[] { "E1", null, null } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultOne);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, resultOne);

            SendBeanInt(epService, "E2", 1, 1, 1, 1, 1, 1);
            var resultTwo = new object[][] { new object[] { "E2", "H01_0", "H11_0" } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultTwo);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo));

            SendBeanInt(epService, "E3", 5, 5, 3, 4, 1, 1);
            var resultThree = new object[][] { new object[] { "E3", "H03_0", "H14_0" } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultThree);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree));

            SendBeanInt(epService, "E4", 0, 5, 3, 4, 1, 1);
            var resultFour = new object[][] { new object[] { "E4", null, "H14_0" } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultFour);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree, resultFour));

            SendBeanInt(epService, "E5", 2, 0, 2, 1, 1, 1);
            var resultFive = new object[][] { new object[] { "E5", "H02_0", null } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultFive);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree, resultFour, resultFive));

            // set 2 rows for H0
            SendBeanInt(epService, "E6", 2, 2, 2, 2, 2, 1);
            var resultSix = new object[][] { new object[] { "E6", "H02_0", "H12_0" }, new object[] { "E6", "H02_1", "H12_0" } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultSix);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree, resultFour, resultFive, resultSix));

            SendBeanInt(epService, "E7", 10, 10, 4, 5, 1, 2);
            var resultSeven = new object[][] { new object[] { "E7", "H04_0", "H15_0" }, new object[] { "E7", "H04_0", "H15_1" } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultSeven);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree, resultFour, resultFive, resultSix, resultSeven));

            stmt.Dispose();
        }
Beispiel #3
0
            private static void TryAssertionSix(
                RegressionEnvironment env,
                string expression)
            {
                env.CompileDeploy(expression).AddListener("s0");

                var fields = new [] { "S0Id","S1Id","valh0" };
                EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, null);

                SendBeanInt(env, "E1", 1, 1);
                Assert.IsFalse(env.Listener("s0").IsInvoked);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, null);

                SendBeanInt(env, "F1", 1, 1);
                object[][] resultOne = {new object[] {"E1", "F1", "E1H01"}};
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultOne);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, resultOne);

                SendBeanInt(env, "F2", 2, 2);
                object[][] resultTwo = {new object[] {null, "F2", null}};
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultTwo);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo));

                SendBeanInt(env, "E2", 2, 2);
                object[][] resultThree = {new object[] {"E2", "F2", "E2H02"}};
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultThree);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultThree));

                SendBeanInt(env, "F3", 3, 3);
                object[][] resultFour = {new object[] {null, "F3", null}};
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultFour);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultThree, resultFour));

                SendBeanInt(env, "E3", 0, 3);
                object[][] resultFive = {new object[] {"E3", "F3", null}};
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultFive);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultThree, resultFive));

                env.UndeployAll();
            }
            private static void TryAssertionTwo(
                RegressionEnvironment env,
                string expression,
                AtomicLong milestone)
            {
                env.CompileDeploy(expression).AddListener("s0");

                var fields = new [] { "Id","valh0","valh1" };
                EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, null);

                SendBeanInt(env, "E1", 1, 1);
                EPAssertionUtil.AssertPropsPerRow(
                    env.Listener("s0").GetAndResetLastNewData(),
                    fields,
                    new[] {new object[] {"E1", "H01", "H011"}});
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    new[] {new object[] {"E1", "H01", "H011"}});

                SendBeanInt(env, "E2", 0, 1);
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, null);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    new[] {new object[] {"E1", "H01", "H011"}});

                env.MilestoneInc(milestone);

                SendBeanInt(env, "E3", 1, 0);
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, null);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    new[] {new object[] {"E1", "H01", "H011"}});

                SendBeanInt(env, "E4", 2, 2);
                object[][] result = {
                    new object[] {"E4", "H01", "H011"}, new object[] {"E4", "H01", "H012"},
                    new object[] {"E4", "H02", "H021"}, new object[] {"E4", "H02", "H022"}
                };
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, result);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    EPAssertionUtil.ConcatenateArray2Dim(
                        result,
                        new[] {new object[] {"E1", "H01", "H011"}}));

                env.UndeployAll();
            }
        private void TryAssertionSix(EPServiceProvider epService, string expression)
        {
            EPStatement stmt     = epService.EPAdministrator.CreateEPL(expression);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            string[] fields = "s0id,s1id,valh0".Split(',');
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);

            SendBeanInt(epService, "E1", 1, 1);
            Assert.IsFalse(listener.IsInvoked);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);

            SendBeanInt(epService, "F1", 1, 1);
            var resultOne = new object[][] { new object[] { "E1", "F1", "E1H01" } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultOne);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, resultOne);

            SendBeanInt(epService, "F2", 2, 2);
            var resultTwo = new object[][] { new object[] { null, "F2", null } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultTwo);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo));

            SendBeanInt(epService, "E2", 2, 2);
            var resultThree = new object[][] { new object[] { "E2", "F2", "E2H02" } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultThree);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultThree));

            SendBeanInt(epService, "F3", 3, 3);
            var resultFour = new object[][] { new object[] { null, "F3", null } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultFour);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultThree, resultFour));

            SendBeanInt(epService, "E3", 0, 3);
            var resultFive = new object[][] { new object[] { "E3", "F3", null } };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultFive);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultThree, resultFive));

            stmt.Dispose();
        }
            public void Run(RegressionEnvironment env)
            {
                var expression = "@Name('s0') select S0.Id as ids0, S1.Id as ids1, S2.Id as ids2, h0.val as valh0 " +
                                 "from SupportBeanInt(Id like 'S0%')#keepall as S0, " +
                                 "SupportBeanInt(Id like 'S1%')#lastevent as S1, " +
                                 "SupportBeanInt(Id like 'S2%')#lastevent as S2, " +
                                 "method:SupportJoinMethods.FetchVal(S1.Id||S2.Id||'H1', S0.P00) as h0 " +
                                 "order by S0.Id, S1.Id, S2.Id, h0.val";
                env.CompileDeploy(expression).AddListener("s0");

                var fields = new [] { "ids0","ids1","ids2","valh0" };
                SendBeanInt(env, "S00", 2);
                SendBeanInt(env, "S10", 1);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, null);
                Assert.IsFalse(env.Listener("s0").IsInvoked);

                SendBeanInt(env, "S20", 1);
                object[][] resultOne =
                    {new object[] {"S00", "S10", "S20", "S10S20H11"}, new object[] {"S00", "S10", "S20", "S10S20H12"}};
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultOne);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, resultOne);

                SendBeanInt(env, "S01", 1);
                object[][] resultTwo = {new object[] {"S01", "S10", "S20", "S10S20H11"}};
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultTwo);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo));

                env.Milestone(0);

                SendBeanInt(env, "S21", 1);
                object[][] resultThree = {
                    new object[] {"S00", "S10", "S21", "S10S21H11"}, new object[] {"S00", "S10", "S21", "S10S21H12"},
                    new object[] {"S01", "S10", "S21", "S10S21H11"}
                };
                EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultThree);
                EPAssertionUtil.AssertPropsPerRowAnyOrder(
                    env.GetEnumerator("s0"),
                    fields,
                    EPAssertionUtil.ConcatenateArray2Dim(resultThree));

                env.UndeployAll();
            }
        private void RunAssertionTwo(String expression)
        {
            EPStatement stmt = epService.EPAdministrator.CreateEPL(expression);

            listener     = new SupportUpdateListener();
            stmt.Events += listener.Update;

            String[] fields = "id,valh0,valh1".Split(',');
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);

            SendBeanInt("E1", 0, 0, 0, 0, 1, 1);
            Assert.IsFalse(listener.IsInvoked);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);

            SendBeanInt("E2", 1, 1, 1, 1, 1, 1);
            Object[][] resultTwo = new Object[][] { new Object[] { "E2", "H01_0", "H11_0" } };
            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultTwo);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultTwo));

            SendBeanInt("E3", 5, 5, 3, 4, 1, 1);
            Object[][] resultThree = new Object[][] { new Object[] { "E3", "H03_0", "H14_0" } };
            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultThree);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultTwo, resultThree));

            SendBeanInt("E4", 0, 5, 3, 4, 1, 1);
            Assert.IsFalse(listener.IsInvoked);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultTwo, resultThree));

            SendBeanInt("E5", 2, 0, 2, 1, 1, 1);
            Assert.IsFalse(listener.IsInvoked);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultTwo, resultThree));

            // set 2 rows for H0
            SendBeanInt("E6", 2, 2, 2, 2, 2, 1);
            Object[][] resultSix = new Object[][] { new Object[] { "E6", "H02_0", "H12_0" }, new Object[] { "E6", "H02_1", "H12_0" } };
            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultSix);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultTwo, resultThree, resultSix));

            SendBeanInt("E7", 10, 10, 4, 5, 1, 2);
            Object[][] resultSeven = new Object[][] { new Object[] { "E7", "H04_0", "H15_0" }, new Object[] { "E7", "H04_0", "H15_1" } };
            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultSeven);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultTwo, resultThree, resultSix, resultSeven));
        }
Beispiel #8
0
        public void Test3Stream1HistSubordinate()
        {
            String expression;

            expression = "select s0.Id as ids0, s1.Id as ids1, s2.Id as ids2, h0.val as valh0 " +
                         "from SupportBeanInt(id like 'S0%').win:keepall() as s0, " +
                         "SupportBeanInt(id like 'S1%').std:lastevent() as s1, " +
                         "SupportBeanInt(id like 'S2%').std:lastevent() as s2, " +
                         "method:SupportJoinMethods.FetchVal(s1.Id||s2.Id||'H1', s0.P00) as h0 " +
                         "order by s0.Id, s1.Id, s2.Id, h0.val";

            EPStatement stmt = _epService.EPAdministrator.CreateEPL(expression);

            _listener    = new SupportUpdateListener();
            stmt.Events += _listener.Update;

            String[] fields = "ids0,ids1,ids2,valh0".Split(',');
            SendBeanInt("S00", 2);
            SendBeanInt("S10", 1);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);
            Assert.IsFalse(_listener.IsInvoked);

            SendBeanInt("S20", 1);
            Object[][] resultOne = new Object[][] { new Object[] { "S00", "S10", "S20", "S10S20H11" }, new Object[] { "S00", "S10", "S20", "S10S20H12" } };
            EPAssertionUtil.AssertPropsPerRow(_listener.GetAndResetLastNewData(), fields, resultOne);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, resultOne);

            SendBeanInt("S01", 1);
            Object[][] resultTwo = new Object[][] { new Object[] { "S01", "S10", "S20", "S10S20H11" } };
            EPAssertionUtil.AssertPropsPerRow(_listener.GetAndResetLastNewData(), fields, resultTwo);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo));

            SendBeanInt("S21", 1);
            Object[][] resultThree = new Object[][] { new Object[] { "S00", "S10", "S21", "S10S21H11" }, new Object[] { "S00", "S10", "S21", "S10S21H12" }, new Object[] { "S01", "S10", "S21", "S10S21H11" } };
            EPAssertionUtil.AssertPropsPerRow(_listener.GetAndResetLastNewData(), fields, resultThree);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultThree));
        }
Beispiel #9
0
        private static void TryAssertionOne(
            RegressionEnvironment env,
            string expression,
            AtomicLong milestone)
        {
            env.CompileDeploy(expression).AddListener("s0");

            var fields = new [] { "Id","valh0","valh1" };
            EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, null);

            SendBeanInt(env, "E1", 0, 0, 0, 0, 1, 1);
            object[][] resultOne = {new object[] {"E1", null, null}};
            EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultOne);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(env.GetEnumerator("s0"), fields, resultOne);

            SendBeanInt(env, "E2", 1, 1, 1, 1, 1, 1);
            object[][] resultTwo = {new object[] {"E2", "H01_0", "H11_0"}};
            EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultTwo);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                env.GetEnumerator("s0"),
                fields,
                EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo));

            env.MilestoneInc(milestone);

            SendBeanInt(env, "E3", 5, 5, 3, 4, 1, 1);
            object[][] resultThree = {new object[] {"E3", "H03_0", "H14_0"}};
            EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultThree);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                env.GetEnumerator("s0"),
                fields,
                EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree));

            SendBeanInt(env, "E4", 0, 5, 3, 4, 1, 1);
            object[][] resultFour = {new object[] {"E4", null, "H14_0"}};
            EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultFour);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                env.GetEnumerator("s0"),
                fields,
                EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree, resultFour));

            SendBeanInt(env, "E5", 2, 0, 2, 1, 1, 1);
            object[][] resultFive = {new object[] {"E5", "H02_0", null}};
            EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultFive);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                env.GetEnumerator("s0"),
                fields,
                EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo, resultThree, resultFour, resultFive));

            // set 2 rows for H0
            SendBeanInt(env, "E6", 2, 2, 2, 2, 2, 1);
            object[][] resultSix = {new object[] {"E6", "H02_0", "H12_0"}, new object[] {"E6", "H02_1", "H12_0"}};
            EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultSix);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                env.GetEnumerator("s0"),
                fields,
                EPAssertionUtil.ConcatenateArray2Dim(
                    resultOne,
                    resultTwo,
                    resultThree,
                    resultFour,
                    resultFive,
                    resultSix));

            SendBeanInt(env, "E7", 10, 10, 4, 5, 1, 2);
            object[][] resultSeven = {new object[] {"E7", "H04_0", "H15_0"}, new object[] {"E7", "H04_0", "H15_1"}};
            EPAssertionUtil.AssertPropsPerRow(env.Listener("s0").GetAndResetLastNewData(), fields, resultSeven);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                env.GetEnumerator("s0"),
                fields,
                EPAssertionUtil.ConcatenateArray2Dim(
                    resultOne,
                    resultTwo,
                    resultThree,
                    resultFour,
                    resultFive,
                    resultSix,
                    resultSeven));

            env.UndeployAll();
        }
        private void RunAssertion3Stream1HistSubordinate(EPServiceProvider epService)
        {
            string expression;

            expression = "select s0.id as ids0, s1.id as ids1, s2.id as ids2, h0.val as valh0 " +
                         "from SupportBeanInt(id like 'S0%')#keepall as s0, " +
                         "SupportBeanInt(id like 'S1%')#lastevent as s1, " +
                         "SupportBeanInt(id like 'S2%')#lastevent as s2, " +
                         "method:SupportJoinMethods.FetchVal(s1.id||s2.id||'H1', s0.p00) as h0 " +
                         "order by s0.id, s1.id, s2.id, h0.val";

            EPStatement stmt     = epService.EPAdministrator.CreateEPL(expression);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            string[] fields = "ids0,ids1,ids2,valh0".Split(',');
            SendBeanInt(epService, "S00", 2);
            SendBeanInt(epService, "S10", 1);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, null);
            Assert.IsFalse(listener.IsInvoked);

            SendBeanInt(epService, "S20", 1);
            var resultOne = new object[][] {
                new object[] {
                    "S00",
                    "S10",
                    "S20",
                    "S10S20H11"
                },
                new object[] {
                    "S00",
                    "S10",
                    "S20",
                    "S10S20H12"
                }
            };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultOne);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, resultOne);

            SendBeanInt(epService, "S01", 1);
            var resultTwo = new object[][] {
                new object[] {
                    "S01",
                    "S10",
                    "S20",
                    "S10S20H11"
                }
            };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultTwo);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultOne, resultTwo));

            SendBeanInt(epService, "S21", 1);
            var resultThree = new object[][] {
                new object[] {
                    "S00",
                    "S10",
                    "S21",
                    "S10S21H11"
                },
                new object[] {
                    "S00",
                    "S10",
                    "S21",
                    "S10S21H12"
                },
                new object[] {
                    "S01",
                    "S10",
                    "S21",
                    "S10S21H11"
                }
            };

            EPAssertionUtil.AssertPropsPerRow(listener.GetAndResetLastNewData(), fields, resultThree);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(
                stmt.GetEnumerator(), fields, EPAssertionUtil.ConcatenateArray2Dim(resultThree));

            stmt.Dispose();
        }