Exemplo n.º 1
0
        private void RunAssertionOutputLimitJoin(SupportSubscriberRowByRowSpecificBase subscriber)
        {
            var stmt = _epService.EPAdministrator.CreateEPL("select TheString, IntPrimitive from SupportBean#keepall, SupportMarketDataBean#keepall() where Symbol = TheString output every 2 events");

            stmt.Subscriber = subscriber;

            _epService.EPRuntime.SendEvent(new SupportMarketDataBean("E1", 0, 1L, ""));
            _epService.EPRuntime.SendEvent(new SupportBean("E1", 1));
            subscriber.AssertNoneReceived();

            _epService.EPRuntime.SendEvent(new SupportBean("E1", 2));
            subscriber.AssertMultipleReceivedAndReset(stmt, new object[][] { new object[] { "E1", 1 }, new object[] { "E1", 2 } });
            stmt.Dispose();
        }
Exemplo n.º 2
0
        private void RunAssertionOutputLimitNoJoin(EventRepresentationChoice eventRepresentationEnum, SupportSubscriberRowByRowSpecificBase subscriber)
        {
            var stmt = _epService.EPAdministrator.CreateEPL(eventRepresentationEnum.GetAnnotationText() + " select TheString, IntPrimitive from SupportBean output every 2 events");

            stmt.Subscriber = subscriber;
            Assert.IsTrue(eventRepresentationEnum.MatchesClass(stmt.EventType.UnderlyingType));

            _epService.EPRuntime.SendEvent(new SupportBean("E1", 1));
            subscriber.AssertNoneReceived();

            _epService.EPRuntime.SendEvent(new SupportBean("E2", 2));
            subscriber.AssertMultipleReceivedAndReset(stmt, new object[][] { new object[] { "E1", 1 }, new object[] { "E2", 2 } });

            stmt.Dispose();
        }