예제 #1
0
        private void RunAsserionNamedMethod(EPStatement stmt, SupportSubscriberMultirowUnderlyingBase subscriber)
        {
            stmt.Subscriber = new EPSubscriber(subscriber, "SomeNewDataMayHaveArrived");

            _epService.EPRuntime.SendEvent(new SupportBean("E1", 1));
            subscriber.AssertOneReceivedAndReset(stmt, new object[] { "E1" }, null);
        }
예제 #2
0
        private void RunAssertionBindWildcardIRStream(SupportSubscriberMultirowUnderlyingBase subscriber)
        {
            var stmt = _epService.EPAdministrator.CreateEPL("select irstream * from SupportBean#length_batch(2)");

            stmt.Subscriber = subscriber;

            var s0 = new SupportBean("E1", 100);
            var s1 = new SupportBean("E2", 200);

            _epService.EPRuntime.SendEvent(s0);
            _epService.EPRuntime.SendEvent(s1);
            subscriber.AssertOneReceivedAndReset(stmt, new object[] { s0, s1 }, null);

            var s2 = new SupportBean("E3", 300);
            var s3 = new SupportBean("E4", 400);

            _epService.EPRuntime.SendEvent(s2);
            _epService.EPRuntime.SendEvent(s3);
            subscriber.AssertOneReceivedAndReset(stmt, new object[] { s2, s3 }, new object[] { s0, s1 });

            stmt.Dispose();
        }