public void SynchronousRestriction_SynchronousHandler()
        {
            PublisherWithSynchronousRestriction p = new PublisherWithSynchronousRestriction();
            SubscriberWithSynchronousHandler sync = new SubscriberWithSynchronousHandler();

            this.testee.Register(p);
            this.testee.Register(sync);
        }
예제 #2
0
        public void SynchronousRestriction_SynchronousHandler()
        {
            PublisherWithSynchronousRestriction p    = new PublisherWithSynchronousRestriction();
            SubscriberWithSynchronousHandler    sync = new SubscriberWithSynchronousHandler();

            this.testee.Register(p);
            this.testee.Register(sync);
        }
        public void SynchronousRestriction_AsynchronousHandler()
        {
            PublisherWithSynchronousRestriction p = new PublisherWithSynchronousRestriction();
            SubscriberWithAsynchronousHandler async = new SubscriberWithAsynchronousHandler();

            this.testee.Register(p);

            Assert.Throws<EventTopicException>(
                () => this.testee.Register(async));
        }
예제 #4
0
        public void SynchronousRestriction_AsynchronousHandler()
        {
            PublisherWithSynchronousRestriction p            = new PublisherWithSynchronousRestriction();
            SubscriberWithAsynchronousHandler   asyncHandler = new SubscriberWithAsynchronousHandler();

            this.testee.Register(p);

            Assert.Throws <EventTopicException>(
                () => this.testee.Register(asyncHandler));
        }