public void MultipleEventsAttachedToCorrectListener()
        {
            TwoOfSameEventSource            eventSource   = new TwoOfSameEventSource();
            CountingEventListener           eventListener = new CountingEventListener();
            ReflectionInstrumentationBinder binder        = new ReflectionInstrumentationBinder();

            binder.Bind(eventSource, eventListener);
            eventSource.Raise();
            Assert.AreEqual(2, eventListener.count);
        }
コード例 #2
0
        public void MultipleEventsAttachedToCorrectListener()
        {
            TwoOfSameEventSource eventSource = new TwoOfSameEventSource();
            CountingEventListener eventListener = new CountingEventListener();

            ReflectionInstrumentationBinder binder = new ReflectionInstrumentationBinder();
            binder.Bind(eventSource, eventListener);

            eventSource.Raise();

            Assert.AreEqual(2, eventListener.count);
        }