Esempio n. 1
0
            public WhenAnExceptionIsThrownFromDeadEventSubscirption()
            {
                var bus = new EventBus();

                bus.Error += (s, e) => errorEvent = e;

                bus.Subscribe <EventBus.DeadEvent>(e => throw new Exception("Error: " + e.Event));

                bus.Publish("Badger");
            }
Esempio n. 2
0
            public WhenAnExceptionIsThrownFromASubscription()
            {
                var bus = new EventBus();

                bus.Error += (s, e) => errorEvent = e;

                bus.Subscribe <string>(s => raisedEvents.Add("Before " + s));
                bus.Subscribe <string>(s => throw new Exception("Error: " + s));
                bus.Subscribe <string>(s => raisedEvents.Add("After " + s));

                bus.Publish("Badger");
            }