public void SliceSizeReturnsExpectedResult() { var size = new SliceSize(2); var sut = new EventSourceReaderConfiguration( StreamNameConversions.PassThru, () => null, size); Assert.Equal(size, sut.SliceSize); }
public void TranslatorFactoryReturnsExpectedResult() { Func <IStreamEventsSliceTranslator> factory = () => null; var sut = new EventSourceReaderConfiguration( StreamNameConversions.PassThru, factory, new SliceSize(1)); Assert.Same(factory, sut.TranslatorFactory); }
public void ConverterReturnsExpectedResult() { StreamNameConverter converter = name => name; var sut = new EventSourceReaderConfiguration( converter, () => null, new SliceSize(1)); Assert.Same(converter, sut.Converter); }
public GroupRepository(IEventStoreConnection connection, EventSourceReaderConfiguration readerConfiguration, EventSourceWriterConfiguration writerConfiguration) { if (connection == null) { throw new ArgumentNullException(nameof(connection)); } if (readerConfiguration == null) { throw new ArgumentNullException(nameof(readerConfiguration)); } if (writerConfiguration == null) { throw new ArgumentNullException(nameof(writerConfiguration)); } _reader = new EventSourceReader( Group.Factory, connection, readerConfiguration); _writer = new EventSourceWriter( connection, writerConfiguration); }