public async Task Clear_child_lifetimes()
        {
            _gridDomainNode = new GridDomainNode(CreateConfiguration(), new SoftwareProgrammingSagaRoutes(), () => new [] { Sys });
            await _gridDomainNode.Start();

            switch (_case)
            {
            case PersistentHubTestsStatus.PersistenceCase.Aggregate:
                Infrastructure = new AggregatePersistedHub_Infrastructure(_gridDomainNode.System);
                break;

            case PersistentHubTestsStatus.PersistenceCase.IstanceSaga:
                Infrastructure = new InstanceSagaPersistedHub_Infrastructure(_gridDomainNode.System);
                break;

            case PersistentHubTestsStatus.PersistenceCase.StateSaga:
                Infrastructure = new StateSagaPersistedHub_Infrastructure(_gridDomainNode.System);
                break;

            default:
                throw new UnknownCaseException();
            }
            var actorOfAsTestActorRef = ActorOfAsTestActorRef <PersistentHubActor>(Infrastructure.HubProps, "TestHub_" + Guid.NewGuid());

            Hub    = actorOfAsTestActorRef.UnderlyingActor;
            HubRef = actorOfAsTestActorRef.Ref;
        }
 public PersistentHubFixture(ITestOutputHelper output,
                             IPersistentActorTestsInfrastructure infrastructure,
                             TimeSpan?clearPeriod     = null,
                             TimeSpan?maxInactiveTime = null) : base(output)
 {
     Infrastructure = infrastructure;
     Add(CreateDomainConfiguration(clearPeriod ?? TimeSpan.FromSeconds(1),
                                   maxInactiveTime ?? TimeSpan.FromSeconds(2)));
 }