Beispiel #1
0
            protected override void Context()
            {
                _handler = SetupHandlerToThrowException();

                IEventPublisher eventPublisher = new EventPublisher();

                eventPublisher.OnHandlerError(ex =>
                {
                    handlerExecuted = true;
                    caughtException = ex;
                });

                eventPublisher.RegisterHandler(_handler);
                eventPublisher.Publish(new EventData());
            }
			protected override void Context()
			{
				_handler = SetupHandlerToThrowException();

				IEventPublisher eventPublisher = new EventPublisher();

				eventPublisher.OnHandlerError(ex =>
					{
						handlerExecuted = true;
						caughtException = ex;
					});
				
				eventPublisher.RegisterHandler(_handler);
				eventPublisher.Publish(new EventData());
			}
Beispiel #3
0
            protected override void Context()
            {
                handlerExecutedCount = 0;
                _handler             = SetupHandlerToThrowException();
                _handler2            = SetupHandlerToThrowException();

                IEventPublisher eventPublisher = new EventPublisher();

                eventPublisher.OnHandlerError(ex =>
                {
                    handlerExecutedCount += 1;
                });

                eventPublisher.RegisterHandler(_handler);
                eventPublisher.RegisterHandler(_handler2);
                eventPublisher.Publish(new EventData());
            }
			protected override void Context()
			{
				handlerExecutedCount = 0;
				_handler = SetupHandlerToThrowException();
				_handler2 = SetupHandlerToThrowException();

				IEventPublisher eventPublisher = new EventPublisher();

				eventPublisher.OnHandlerError(ex =>
					{
						handlerExecutedCount += 1;
					});

				eventPublisher.RegisterHandler(_handler);
				eventPublisher.RegisterHandler(_handler2);
				eventPublisher.Publish(new EventData());
			}