public void TestThatProjectionsPipeline()
        {
            var store = Store;

            var filterOutcome       = new FilterOutcome();
            var filterOutcomeAccess = filterOutcome.AfterCompleting(3);

            var filter1 =
                FilterProjectionDispatcherActor.FilterFor(World, ProjectionDispatcher, new[] { "op-1" }, filterOutcome);

            var filter2 =
                FilterProjectionDispatcherActor.FilterFor(World, filter1, new[] { "op-1" }, filterOutcome);

            FilterProjectionDispatcherActor.FilterFor(World, filter2, new[] { "op-1" }, filterOutcome);

            var entity1 = new Entity1("123-1", 1);

            store.Write(entity1.Id, entity1, 1, Metadata.With("value1", "op-1"), new MockResultInterest());

            Assert.Equal(3, filterOutcomeAccess.ReadFrom <int>("filterCount"));
        }
        public void TestThatTextStateDataProjects()
        {
            var store = Store;

            var interest = new MockResultInterest();

            var projection = new MockProjection();

            var access = projection.AfterCompleting(2);

            ProjectionDispatcher.ProjectTo(projection, new[] { "op1" });
            ProjectionDispatcher.ProjectTo(projection, new[] { "op2" });

            var entity1 = new Entity1("123-1", 1);
            var entity2 = new Entity1("123-2", 2);

            store.Write(entity1.Id, entity1, 1, Metadata.With("value1", "op1"), interest);
            store.Write(entity2.Id, entity2, 1, Metadata.With("value2", "op2"), interest);

            Assert.Equal(2, access.ReadFrom <int>("projections"));
            Assert.Equal("123-1", access.ReadFrom <int, string>("projectionId", 0));
            Assert.Equal("123-2", access.ReadFrom <int, string>("projectionId", 1));
        }