Example #1
0
        public void MerchantDomainEventHandler_MerchantReferenceAllocatedEvent_EventIsHandled()
        {
            MerchantReferenceAllocatedEvent merchantReferenceAllocatedEvent = TestData.MerchantReferenceAllocatedEvent;

            Mock <IEstateReportingRepository> estateReportingRepository = new Mock <IEstateReportingRepository>();

            MerchantDomainEventHandler eventHandler = new MerchantDomainEventHandler(estateReportingRepository.Object);

            Logger.Initialise(NullLogger.Instance);

            Should.NotThrow(async() => { await eventHandler.Handle(merchantReferenceAllocatedEvent, CancellationToken.None); });
        }
Example #2
0
 private async Task HandleSpecificDomainEvent(MerchantReferenceAllocatedEvent domainEvent,
                                              CancellationToken cancellationToken)
 {
     await this.EstateReportingRepository.UpdateMerchant(domainEvent, cancellationToken);
 }