コード例 #1
0
        public void TestAutoNamePackage()
        {
            _configOps.AddEventTypeAutoName(GetType().Namespace);

            EPStatement stmt = _epService.EPAdministrator.CreateEPL("select * from " + typeof(MyAutoNamedEventType).FullName);

            stmt.Events += _testListener.Update;

            MyAutoNamedEventType eventOne = new MyAutoNamedEventType(10);

            _epService.EPRuntime.SendEvent(eventOne);
            Assert.AreSame(eventOne, _testListener.AssertOneGetNewAndReset().Underlying);
        }
コード例 #2
0
        private void RunAssertionAutoNamePackage(EPServiceProvider epService)
        {
            epService.EPAdministrator.Configuration.AddEventTypeAutoName(typeof(MyAutoNamedEventType).Namespace);

            EPStatement stmt         = epService.EPAdministrator.CreateEPL("select * from " + typeof(MyAutoNamedEventType).FullName);
            var         testListener = new SupportUpdateListener();

            stmt.Events += testListener.Update;

            var eventOne = new MyAutoNamedEventType(10);

            epService.EPRuntime.SendEvent(eventOne);
            Assert.AreSame(eventOne, testListener.AssertOneGetNewAndReset().Underlying);

            stmt.Dispose();
        }