public GroupScenarios(EmbeddedEventStoreFixture fixture) { var settings = new JsonSerializerSettings(); var prefix = fixture.NextStreamNamePrefix(); var converter = StreamNameConversions.WithPrefix(prefix); _runner = new ScenarioRunner( new CommandHandlerInvoker(new CommandHandlerModule[] { new GroupModule( new GroupRepository(fixture.Connection, new EventSourceReaderConfiguration( converter, () => new StreamEventsSliceTranslator( name => Type.GetType(name, true), settings), new SliceSize(100)), new EventSourceWriterConfiguration( converter, new EventSourceChangesetTranslator( type => type.FullName, settings)))) }), fixture.Connection, settings, prefix); }
public ScenarioRunner(CommandHandlerInvoker invoker, IEventStoreConnection connection, JsonSerializerSettings settings, string prefix) { _invoker = invoker ?? throw new ArgumentNullException(nameof(invoker)); _connection = connection ?? throw new ArgumentNullException(nameof(connection)); _settings = settings ?? throw new ArgumentNullException(nameof(settings)); _prefix = prefix ?? throw new ArgumentNullException(nameof(prefix)); _converter = StreamNameConversions.WithPrefix(prefix); }