private void RunAssertionBatchWindow(EPServiceProvider epService)
        {
            string epl = "select irstream " +
                         "first(TheString) as fs, " +
                         "window(TheString) as ws, " +
                         "last(TheString) as ls " +
                         "from SupportBean#length_batch(2) as sb";
            EPStatement stmt     = epService.EPAdministrator.CreateEPL(epl);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            string[] fields = "fs,ws,ls".Split(',');

            epService.EPRuntime.SendEvent(new SupportBean("E1", 0));
            epService.EPRuntime.SendEvent(new SupportBean("E2", 0));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { null, null, null });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new[] { "E1", Split("E1,E2"), "E2" });
            listener.Reset();

            epService.EPRuntime.SendEvent(new SupportBean("E3", 0));
            epService.EPRuntime.SendEvent(new SupportBean("E4", 0));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new[] { "E1", Split("E1,E2"), "E2" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new[] { "E3", Split("E3,E4"), "E4" });
            listener.Reset();

            epService.EPRuntime.SendEvent(new SupportBean("E5", 0));
            epService.EPRuntime.SendEvent(new SupportBean("E6", 0));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new[] { "E3", Split("E3,E4"), "E4" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new[] { "E5", Split("E5,E6"), "E6" });
            listener.Reset();

            stmt.Dispose();
        }
        private void RunAssertionIntersectGroupBy(EPServiceProvider epService)
        {
            var fields = new string[] { "TheString" };

            string      text     = "select irstream TheString from SupportBean#groupwin(IntPrimitive)#length(2)#unique(IntBoxed) retain-intersection";
            EPStatement stmt     = epService.EPAdministrator.CreateEPL(text);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            SendEvent(epService, "E1", 1, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E1" });

            SendEvent(epService, "E2", 2, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E2" });

            SendEvent(epService, "E3", 1, 20);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2", "E3"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E3" });

            SendEvent(epService, "E4", 1, 30);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E3", "E4"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E1" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E4" });
            listener.Reset();

            SendEvent(epService, "E5", 2, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E3", "E4", "E5"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E2" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E5" });
            listener.Reset();

            SendEvent(epService, "E6", 1, 20);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E5", "E6"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E3" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E6" });
            listener.Reset();

            SendEvent(epService, "E7", 1, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E5", "E6", "E7"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E4" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E7" });
            listener.Reset();

            SendEvent(epService, "E8", 2, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E6", "E7", "E8"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E5" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E8" });
            listener.Reset();

            // another combination
            stmt.Dispose();
            epService.EPAdministrator.CreateEPL("select * from SupportBean#groupwin(TheString)#time(.0083 sec)#firstevent").Dispose();
        }
        private void TryAssertionTimeWinUnique(EPServiceProvider epService, SupportUpdateListener listener, EPStatement stmt)
        {
            var fields = new string[] { "TheString" };

            SendTimer(epService, 1000);
            SendEvent(epService, "E1", 1);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E1" });

            SendTimer(epService, 2000);
            SendEvent(epService, "E2", 2);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E2" });

            SendTimer(epService, 3000);
            SendEvent(epService, "E3", 1);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E1" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E3" });
            listener.Reset();
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E3"));

            SendTimer(epService, 4000);
            SendEvent(epService, "E4", 3);
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E4" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E3", "E4"));
            SendEvent(epService, "E5", 3);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E4" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E5" });
            listener.Reset();
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E3", "E5"));

            SendTimer(epService, 11999);
            Assert.IsFalse(listener.IsInvoked);
            SendTimer(epService, 12000);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOldAndReset(), fields, new object[] { "E2" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E3", "E5"));

            SendTimer(epService, 12999);
            Assert.IsFalse(listener.IsInvoked);
            SendTimer(epService, 13000);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOldAndReset(), fields, new object[] { "E3" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E5"));

            SendTimer(epService, 13999);
            Assert.IsFalse(listener.IsInvoked);
            SendTimer(epService, 14000);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOldAndReset(), fields, new object[] { "E5" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr());
        }
Example #4
0
        private void RunAssertionUnionPattern(EPServiceProvider epService)
        {
            var fields = new string[] { "string" };

            string      text     = "select irstream a.p00||b.p10 as string from pattern [every a=SupportBean_S0 -> b=SupportBean_S1]#unique(a.id)#unique(b.id) retain-union";
            EPStatement stmt     = epService.EPAdministrator.CreateEPL(text);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            epService.EPRuntime.SendEvent(new SupportBean_S0(1, "E1"));
            epService.EPRuntime.SendEvent(new SupportBean_S1(2, "E2"));
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1E2"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E1E2" });

            epService.EPRuntime.SendEvent(new SupportBean_S0(10, "E3"));
            epService.EPRuntime.SendEvent(new SupportBean_S1(20, "E4"));
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1E2", "E3E4"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E3E4" });

            epService.EPRuntime.SendEvent(new SupportBean_S0(1, "E5"));
            epService.EPRuntime.SendEvent(new SupportBean_S1(2, "E6"));
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E3E4", "E5E6"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E1E2" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E5E6" });

            stmt.Dispose();
        }
Example #5
0
        private void RunAssertionUnionThreeUnique(EPServiceProvider epService)
        {
            var fields = new string[] { "TheString" };

            EPStatement stmt     = epService.EPAdministrator.CreateEPL("select irstream TheString from SupportBean#unique(IntPrimitive)#unique(IntBoxed)#unique(DoublePrimitive) retain-union");
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            SendEvent(epService, "E1", 1, 10, 100d);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E1" });

            SendEvent(epService, "E2", 2, 10, 200d);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E2" });

            SendEvent(epService, "E3", 2, 20, 100d);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2", "E3"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E3" });

            SendEvent(epService, "E4", 1, 30, 300d);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E3", "E4"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E1" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E4" });
            listener.Reset();

            stmt.Dispose();
        }
Example #6
0
        private void RunAssertionUnionSorted(EPServiceProvider epService)
        {
            var fields = new string[] { "TheString" };

            EPStatement stmt     = epService.EPAdministrator.CreateEPL("select irstream TheString from SupportBean#sort(2, IntPrimitive)#sort(2, IntBoxed) retain-union");
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            SendEvent(epService, "E1", 1, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E1" });

            SendEvent(epService, "E2", 2, 9);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E2" });

            SendEvent(epService, "E3", 0, 0);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2", "E3"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E3" });

            SendEvent(epService, "E4", -1, -1);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E3", "E4"));
            Assert.AreEqual(2, listener.LastOldData.Length);
            object[] result = { listener.LastOldData[0].Get("TheString"), listener.LastOldData[1].Get("TheString") };
            EPAssertionUtil.AssertEqualsAnyOrder(result, new string[] { "E1", "E2" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E4" });
            listener.Reset();

            SendEvent(epService, "E5", 1, 1);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E3", "E4"));
            Assert.AreEqual(1, listener.LastOldData.Length);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E5" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E5" });
            listener.Reset();

            SendEvent(epService, "E6", 0, 0);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E6"));
            Assert.AreEqual(1, listener.LastOldData.Length);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E3" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E6" });
            listener.Reset();

            stmt.Dispose();
        }
        public void TestIntersectGroupBy()
        {
            Init(false);
            var fields = new String[] { "TheString" };

            var text = "select irstream TheString from SupportBean.std:groupwin(IntPrimitive).win:length(2).std:unique(IntBoxed) retain-intersection";
            var stmt = _epService.EPAdministrator.CreateEPL(text);

            stmt.Events += _listener.Update;

            SendEvent("E1", 1, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNewAndReset(), fields, new Object[] { "E1" });

            SendEvent("E2", 2, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNewAndReset(), fields, new Object[] { "E2" });

            SendEvent("E3", 1, 20);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2", "E3"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNewAndReset(), fields, new Object[] { "E3" });

            SendEvent("E4", 1, 30);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E3", "E4"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetOld(), fields, new Object[] { "E1" });
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNew(), fields, new Object[] { "E4" });
            _listener.Reset();

            SendEvent("E5", 2, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E3", "E4", "E5"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetOld(), fields, new Object[] { "E2" });
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNew(), fields, new Object[] { "E5" });
            _listener.Reset();

            SendEvent("E6", 1, 20);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E5", "E6"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetOld(), fields, new Object[] { "E3" });
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNew(), fields, new Object[] { "E6" });
            _listener.Reset();

            SendEvent("E7", 1, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E5", "E6", "E7"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetOld(), fields, new Object[] { "E4" });
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNew(), fields, new Object[] { "E7" });
            _listener.Reset();

            SendEvent("E8", 2, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E6", "E7", "E8"));
            EPAssertionUtil.AssertProps(_listener.AssertOneGetOld(), fields, new Object[] { "E5" });
            EPAssertionUtil.AssertProps(_listener.AssertOneGetNew(), fields, new Object[] { "E8" });
            _listener.Reset();

            // another combination
            _epService.EPAdministrator.CreateEPL("select * from SupportBean.std:groupwin(TheString).win:time(.0083 sec).std:firstevent()");
        }
Example #8
0
        private void RunAssertionUnionTwoUnique(EPServiceProvider epService)
        {
            var fields = new string[] { "TheString" };

            EPStatement stmt     = epService.EPAdministrator.CreateEPL("select irstream TheString from SupportBean#unique(IntPrimitive)#unique(IntBoxed) retain-union");
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            SendEvent(epService, "E1", 1, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E1" });

            SendEvent(epService, "E2", 2, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E2" });

            SendEvent(epService, "E3", 1, 20);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E3"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E1" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E3" });
            listener.Reset();

            SendEvent(epService, "E4", 1, 20);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E4"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E3" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E4" });
            listener.Reset();

            SendEvent(epService, "E5", 2, 30);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E2", "E4", "E5"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E5" });

            SendEvent(epService, "E6", 3, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E5", "E6"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E2" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E6" });
            listener.Reset();

            SendEvent(epService, "E7", 3, 30);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E5", "E6", "E7"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E7" });

            SendEvent(epService, "E8", 4, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E5", "E7", "E8"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E6" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E8" });
            listener.Reset();

            SendEvent(epService, "E9", 3, 50);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E5", "E7", "E8", "E9"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E9" });

            SendEvent(epService, "E10", 2, 30);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4", "E8", "E9", "E10"));
            Assert.AreEqual(2, listener.LastOldData.Length);
            EPAssertionUtil.AssertProps(listener.LastOldData[0], fields, new object[] { "E5" });
            EPAssertionUtil.AssertProps(listener.LastOldData[1], fields, new object[] { "E7" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E10" });
            listener.Reset();

            stmt.Dispose();
        }
        private void RunAssertionIntersectTimeWinNamedWindowDelete(EPServiceProvider epService)
        {
            SendTimer(epService, 0);
            EPStatement stmt = epService.EPAdministrator.CreateEPL("create window MyWindowThree#time(10 sec)#unique(IntPrimitive) retain-intersection as select * from SupportBean");

            epService.EPAdministrator.CreateEPL("insert into MyWindowThree select * from SupportBean");
            epService.EPAdministrator.CreateEPL("on SupportBean_S0 delete from MyWindowThree where IntBoxed = id");
            var listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            var fields = new string[] { "TheString" };

            SendTimer(epService, 1000);
            SendEvent(epService, "E1", 1, 10);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E1" });

            SendTimer(epService, 2000);
            SendEvent(epService, "E2", 2, 20);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E2"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E2" });

            epService.EPRuntime.SendEvent(new SupportBean_S0(20));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOldAndReset(), fields, new object[] { "E2" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1"));

            SendTimer(epService, 3000);
            SendEvent(epService, "E3", 3, 30);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E3"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E3" });
            SendEvent(epService, "E4", 3, 40);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E4"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E3" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E4" });
            listener.Reset();

            SendTimer(epService, 4000);
            SendEvent(epService, "E5", 4, 50);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E4", "E5"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetNewAndReset(), fields, new object[] { "E5" });
            SendEvent(epService, "E6", 4, 50);
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E4", "E6"));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOld(), fields, new object[] { "E5" });
            EPAssertionUtil.AssertProps(listener.AssertOneGetNew(), fields, new object[] { "E6" });
            listener.Reset();

            epService.EPRuntime.SendEvent(new SupportBean_S0(20));
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E4", "E6"));
            Assert.IsFalse(listener.IsInvoked);

            epService.EPRuntime.SendEvent(new SupportBean_S0(50));
            EPAssertionUtil.AssertProps(listener.AssertOneGetOldAndReset(), fields, new object[] { "E6" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E1", "E4"));

            SendTimer(epService, 10999);
            Assert.IsFalse(listener.IsInvoked);
            SendTimer(epService, 11000);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOldAndReset(), fields, new object[] { "E1" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr("E4"));

            SendTimer(epService, 12999);
            Assert.IsFalse(listener.IsInvoked);
            SendTimer(epService, 13000);
            EPAssertionUtil.AssertProps(listener.AssertOneGetOldAndReset(), fields, new object[] { "E4" });
            EPAssertionUtil.AssertPropsPerRowAnyOrder(stmt.GetEnumerator(), fields, ToArr());

            SendTimer(epService, 10000000);
            Assert.IsFalse(listener.IsInvoked);

            epService.EPAdministrator.DestroyAllStatements();
        }