public void Configure( ISubscribeMessageHandlers configuration, IFeatureSelector featureSelector, IDeliverMessages bus, IEventSourcedRepository repository) { this.Repository = repository; configuration.SubscribeCommandHandler <CreateGiftcard>(this.HandleAsync); configuration.SubscribeCommandHandler <ActivateGiftcard>(this.HandleAsync); configuration.SubscribeCommandHandler <RedeemGiftcard>(this.HandleAsync); configuration.SubscribeCommandHandler <LoadGiftcard>(this.HandleAsync); configuration.SubscribeEventHandler <GiftcardCreated>(this.cardNumberEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardCreated>(this.giftcardOverviewEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardActivated>(this.giftcardOverviewEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardRedeemed>(this.giftcardOverviewEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardLoaded>(this.giftcardOverviewEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardCreated>(this.giftcardTransactionEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardActivated>(this.giftcardTransactionEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardRedeemed>(this.giftcardTransactionEventHandler.HandleAsync); configuration.SubscribeEventHandler <GiftcardLoaded>(this.giftcardTransactionEventHandler.HandleAsync); }
public SqlIntegrationTest() { this.aggregateId = Guid.NewGuid(); this.bus = A.Fake <IDeliverMessages>(); var factory = new EventStoreFactory(); var configuration = new ContainerLessEventStoreConfiguration(factory); configuration.UseSqlEventStore(); this.testee = factory.Create(configuration, bus); }