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)
public EventBatchProducer( IDateTimeProvider dateTimeProvider, IEventIdProvider eventIdProvider, IEventNameProvider nameProvider) { this.dateTimeProvider = dateTimeProvider; this.eventIdProvider = eventIdProvider; this.nameProvider = nameProvider; }
public EventNamespaceMessageTypeProvider(IEventNameProvider eventNameProvider) { _eventNameProvider = eventNameProvider; }
public EventNamespaceNameFormatter(IEntityNameFormatter defaultEntityNameFormatter, IEventNameProvider eventNameProvider) { _defaultEntityNameFormatter = defaultEntityNameFormatter; _eventNameProvider = eventNameProvider; }