Пример #1
0
        public void AsynchronousRestriction_AsynchronousHandler()
        {
            PublisherWithAsynchronousRestriction p            = new PublisherWithAsynchronousRestriction();
            SubscriberWithAsynchronousHandler    asyncHandler = new SubscriberWithAsynchronousHandler();

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

            this.testee.Register(p);

            Assert.Throws<EventTopicException>(
                () => this.testee.Register(async));
        }
        public void NoRestriction()
        {
            PublisherWithoutRestriction p = new PublisherWithoutRestriction();
            SubscriberWithSynchronousHandler sync = new SubscriberWithSynchronousHandler();
            SubscriberWithAsynchronousHandler async = new SubscriberWithAsynchronousHandler();

            this.testee.Register(p);
            this.testee.Register(sync);
            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));
        }
Пример #5
0
        public void NoRestriction()
        {
            PublisherWithoutRestriction       p            = new PublisherWithoutRestriction();
            SubscriberWithSynchronousHandler  sync         = new SubscriberWithSynchronousHandler();
            SubscriberWithAsynchronousHandler asyncHandler = new SubscriberWithAsynchronousHandler();

            this.testee.Register(p);
            this.testee.Register(sync);
            this.testee.Register(asyncHandler);
        }
        public void AsynchronousRestriction_AsynchronousHandler()
        {
            PublisherWithAsynchronousRestriction p = new PublisherWithAsynchronousRestriction();
            SubscriberWithAsynchronousHandler asyncHandler = new SubscriberWithAsynchronousHandler();

            this.testee.Register(p);
            this.testee.Register(asyncHandler);
        }