Example #1
0
        public void Handle(EmailEnqueuedToBeSentDomainEvent domainEvent)
        {
            var message = new EmailEnqueuedToBeSentEventMessage {
                EmailId = domainEvent.EmailId
            };

            _bus.Publish(message).Wait();
        }
Example #2
0
        public void Context()
        {
            _bus = A.Fake <IBus>();
            _bus.ExpectMessagePublished <EmailEnqueuedToBeSentEventMessage>(x => _message = x);

            var evnt = new EmailEnqueuedToBeSentDomainEvent {
                EmailId = EmailId
            };
            var handler = new EmailEnqueuedToBeSentDomainEventHandler(_bus);

            handler.Handle(evnt);
        }