Exemple #1
0
        public void SetUpTest()
        {
            Fixture = new Fixture().Customize(new AutoMoqCustomization());
            Fixture.Customize <TestId>(x => x.FromFactory(() => TestId.New));
            Fixture.Customize <Label>(s => s.FromFactory(() => Label.Named(string.Format("label-{0}", Guid.NewGuid().ToString().ToLowerInvariant()))));

            DomainEventFactory = new DomainEventFactory();
        }
Exemple #2
0
 public ExamplesMultiplerController(
     IResolver resolver,
     IQueryProcessor queryProcessor)
 {
     _domainEventPublisher = resolver.Resolve <IDomainEventPublisher>();
     _domainEventFactory   = resolver.Resolve <IDomainEventFactory>();
     _queryProcessor       = queryProcessor;
 }
 public EventJsonSerializer(
     IJsonSerializer jsonSerializer,
     IEventDefinitionService eventDefinitionService,
     IDomainEventFactory domainEventFactory)
 {
     _jsonSerializer         = jsonSerializer;
     _eventDefinitionService = eventDefinitionService;
     _domainEventFactory     = domainEventFactory;
 }
Exemple #4
0
 public EventFeed(
     IDomainEventFactory eventFactory,
     IDomainEventClientFactory clientFactory,
     IMicrowaveLogger <EventFeed <T> > logger)
 {
     _eventFactory  = eventFactory;
     _clientFactory = clientFactory;
     _logger        = logger;
 }
Exemple #5
0
 public CustomEventJsonSerializer(ILog log,
                                  IJsonSerializer jsonSerializer,
                                  IEventDefinitionService eventDefinitionService,
                                  IDomainEventFactory domainEventFactory)
 {
     _jsonSerializer         = jsonSerializer;
     _eventDefinitionService = eventDefinitionService;
     _domainEventFactory     = domainEventFactory;
     _log = log;
 }
        public ATest()
        {
            Fixture = new Fixture().Customize(new AutoMoqCustomization());

            // Fixture.Customize<CompetitionId>(x => x.FromFactory(() => CompetitionId.New));
            // Fixture.Customize<EntryId>(x => x.FromFactory(() => EntryId.New));
            // Fixture.Customize<EventId>(c => c.FromFactory(() => EventId.New));

            DomainEventFactory = new DomainEventFactory();
        }
Exemple #7
0
        public void SetUpTest()
        {
            Fixture = new Fixture().Customize(new AutoMoqCustomization());

            Fixture.Customize <ThingyId>(x => x.FromFactory(() => ThingyId.New));
            Fixture.Customize <ThingyMessageId>(x => x.FromFactory(() => ThingyMessageId.New));
            Fixture.Customize <EventId>(c => c.FromFactory(() => EventId.New));
            Fixture.Customize <Label>(s => s.FromFactory(() => Label.Named($"label-{Guid.NewGuid():D}")));

            DomainEventFactory = new DomainEventFactory();
        }
Exemple #8
0
        public AppointmentBookCommandHandler(IMongoDbInsertOnlyReadModelStore <AppointmentInsertReadModel> mongoDbInsert, IDomainEventPublisher domainEventPublisher, IDomainEventFactory eventFactory, ISnapshotStore snapshotStore, IEventStore eventStore, IEventJsonSerializer jsonSerializer, IMongoDbEventSequenceStore sequenceStore)
        {
            this.domainEventPublisher = domainEventPublisher;
            this.sequenceStore        = sequenceStore;
            this.jsonSerializer       = jsonSerializer;
            this.eventStore           = eventStore;
            this.eventFactory         = eventFactory;

            this.mongoDbInsert = mongoDbInsert;
            this.snapshotStore = snapshotStore;
        }
Exemple #9
0
        public RabbitMqEventProvider(IRabbitMqEventProviderConfiguration configuration, IApplicationDefinition applicationDefinition, IDomainEventFactory domainEventFactory, IDomainEventBus domainEventBus)
        {
            _configuration          = configuration;
            _rabbitMqMessageFactory = new RabbitMqMessageFactory();

            _applicationDefinition = applicationDefinition;
            _domainEventFactory    = domainEventFactory;
            _domainEventBus        = domainEventBus;

            _connectionFactory = new ConnectionFactory {
                Uri = _configuration.Connection
            };
        }
Exemple #10
0
 public UpgradeV1ToV2(
     IDomainEventFactory domainEventFactory)
 {
     _domainEventFactory = domainEventFactory;
 }
 public UpgradeTestEventV2ToTestEventV3(IDomainEventFactory domainEventFactory)
 {
     _domainEventFactory = domainEventFactory;
 }
Exemple #12
0
 public MockAggregateStore(TActualAggregate aggregate)
 {
     _domainEventFactory = new DomainEventFactory();
     _aggregate          = aggregate ?? throw new ArgumentNullException(nameof(aggregate));
 }