public StatefulProcessTest(ITestOutputHelper output)
        {
            var converter = new Converter(output);
            Console.SetOut(converter);
            
            _world = World.StartWithDefaults("five-step-process-test");

            var queue = new AsyncMessageQueue(null);
            _exchange = new LocalExchange(queue);
            _dispatcher = new MockTextDispatcher();
            var stateStore = _world.ActorFor<IStateStore>(() => new InMemoryStateStoreActor<TextState>(new List<IDispatcher> {_dispatcher}));

            var statefulTypeRegistry = new StatefulTypeRegistry(_world);
            
            var stepCountStateInfo = new Vlingo.Xoom.Lattice.Model.Stateful.Info(stateStore, typeof(StepCountState), stateStore.GetType().Name);
            statefulTypeRegistry.Register(stepCountStateInfo);

            _exchangeReceivers = new ExchangeReceivers();
            _exchangeSender = new LocalExchangeSender(queue);

            var processTypeRegistry = new ProcessTypeRegistry(_world);
            processTypeRegistry.Register(new StatefulProcessInfo<FiveStepEmittingStatefulProcess, StepCountState>(nameof(FiveStepEmittingStatefulProcess), _exchange, statefulTypeRegistry));

            RegisterExchangeCoveys();
        }
        public SourcedProcessTest(ITestOutputHelper output)
        {
            var converter = new Converter(output);

            Console.SetOut(converter);

            _world = World.StartWithDefaults("five-step-process-test");

            var queue = new AsyncMessageQueue(null);

            _exchange   = new LocalExchange(queue);
            _dispatcher = new MockJournalDispatcher();
            _journal    = new InMemoryJournal <string>(_dispatcher, _world);

            _sourcedTypeRegistry = new SourcedTypeRegistry(_world);

            RegisterSourcedTypes <FiveStepSendingSourcedProcess>();
            RegisterSourcedTypes <FiveStepEmittingSourcedProcess>();

            _exchangeReceivers = new ExchangeReceivers();
            _exchangeSender    = new LocalExchangeSender(queue);

            var processTypeRegistry = new ProcessTypeRegistry(_world);

            processTypeRegistry.Register(new SourcedProcessInfo <FiveStepSendingSourcedProcess, PorcessObjectState>(nameof(FiveStepSendingSourcedProcess), _exchange, _sourcedTypeRegistry));
            processTypeRegistry.Register(new SourcedProcessInfo <FiveStepEmittingSourcedProcess, PorcessObjectState>(nameof(FiveStepEmittingSourcedProcess), _exchange, _sourcedTypeRegistry));

            RegisterExchangeCoveys();
        }
        public ObjectProcessTest(ITestOutputHelper output)
        {
            var converter = new Converter(output);

            Console.SetOut(converter);

            _world = World.StartWithDefaults("five-step-process-test");

            var queue = new AsyncMessageQueue(null);

            _exchange = new LocalExchange(queue);
            var adapter = new ProcessMessageTextAdapter();

            EntryAdapterProvider.Instance(_world).RegisterAdapter(adapter);

            var dispatcher  = new MockDispatcher();
            var objectStore = _world.ActorFor <IObjectStore>(() => new InMemoryObjectStoreActor <string>(dispatcher));

            var objectTypeRegistry = new ObjectTypeRegistry(_world);

            var stepCountStateInfo =
                new Info <StepCountObjectState>(
                    objectStore,
                    nameof(StepCountObjectState),
                    MapQueryExpression.Using <StepCountObjectState>("find", MapQueryExpression.Map("id", "id")),
                    StateObjectMapper.With <StepCountObjectState>(new object(), new object()));

            objectTypeRegistry.Register(stepCountStateInfo);

            _exchangeSender = new LocalExchangeSender(queue);

            var processTypeRegistry = new ProcessTypeRegistry(_world);

            processTypeRegistry.Register(new ObjectProcessInfo <FiveStepEmittingObjectProcess, StepCountObjectState>(nameof(FiveStepEmittingObjectProcess), _exchange, objectTypeRegistry));

            _exchangeReceivers = new ExchangeReceivers();

            RegisterExchangeCoveys();
        }