コード例 #1
0
        public EventBatchProducerTests()
        {
            dateTimeProvider  = Substitute.For <IDateTimeProvider>();
            nameProvider      = Substitute.For <IEventNameProvider>();
            eventIdProvider   = Substitute.For <IEventIdProvider>();
            expectedName      = "event-name";
            expectedTimestamp = DateTimeOffset.Now;
            metadata          = new StreamMetadata(
                "id",
                "pk",
                "streamId",
                1,
                StreamState.Active,
                expectedTimestamp.AddDays(-1));
            options = new StreamWriteOptions
            {
                CausationId   = "A",
                CorrelationId = "B",
            };
            @event          = new Fixture().Create <TestEvent>();
            expectedEventId = new Fixture().Create <string>();

            dateTimeProvider
            .GetDateTime()
            .Returns(expectedTimestamp);
            nameProvider
            .GetName(default)
コード例 #2
0
 public EventBatchProducer(
     IDateTimeProvider dateTimeProvider,
     IEventIdProvider eventIdProvider,
     IEventNameProvider nameProvider)
 {
     this.dateTimeProvider = dateTimeProvider;
     this.eventIdProvider  = eventIdProvider;
     this.nameProvider     = nameProvider;
 }
コード例 #3
0
 public EventNamespaceMessageTypeProvider(IEventNameProvider eventNameProvider)
 {
     _eventNameProvider = eventNameProvider;
 }
コード例 #4
0
 public EventNamespaceNameFormatter(IEntityNameFormatter defaultEntityNameFormatter, IEventNameProvider eventNameProvider)
 {
     _defaultEntityNameFormatter = defaultEntityNameFormatter;
     _eventNameProvider          = eventNameProvider;
 }