コード例 #1
0
        private void FindEvent(SupportMTUpdateListener listener, int loop, Object theEvent)
        {
            var message = "Failed in loop " + loop + " threads " + Thread.CurrentThread;

            Assert.IsTrue(listener.IsInvoked(), message);
            var eventBeans = listener.GetNewDataListCopy();
            var found      = false;

            foreach (EventBean[] events in eventBeans)
            {
                Assert.AreEqual(1, events.Length, message);
                if (events[0].Underlying == theEvent)
                {
                    found = true;
                }
            }
            Assert.IsTrue(found, message);
            listener.Reset();
        }