public void when_add_factory_to_start_process()
        {
            var builder = new CqrsEngineBuilder(null);
            builder.AddTask(x => new Task(() => { }, x));

            Assert.AreEqual(2, builder.Processes.Count);
            Assert.AreEqual(typeof(TaskProcess), builder.Processes[1].GetType());
        }
        public void when_build()
        {
            var builder = new CqrsEngineBuilder(null);
            var testEngineProcess = new TestEngineProcess();
            builder.AddTask(testEngineProcess);
            builder.Build(new CancellationToken());

            Assert.IsTrue(testEngineProcess.IsInitialized);
        }
        public void when_add_process()
        {
            var builder = new CqrsEngineBuilder(null);
            var testEngineProcess = new TestEngineProcess();
            builder.AddTask(testEngineProcess);

            Assert.AreEqual(2, builder.Processes.Count);
            Assert.AreEqual(testEngineProcess, builder.Processes[1]);
        }