public IFixtureArranger <TAggregate, TIdentity> Using <TAggregateManager>( Expression <Func <TAggregateManager> > aggregateManagerFactory, TIdentity aggregateId) where TAggregateManager : ReceiveActor, IAggregateManager <TAggregate, TIdentity> { if (aggregateId == null) { throw new ArgumentNullException(nameof(aggregateId)); } if (!AggregateEventTestProbe.IsNobody()) { throw new InvalidOperationException(nameof(AggregateEventTestProbe)); } if (!AggregateReplyTestProbe.IsNobody()) { throw new InvalidOperationException(nameof(AggregateReplyTestProbe)); } AggregateId = aggregateId; AggregateEventTestProbe = _testKit.CreateTestProbe("aggregate-event-test-probe"); AggregateReplyTestProbe = _testKit.CreateTestProbe("aggregate-reply-test-probe"); AggregateRef = _testKit.Sys.ActorOf(Props.Create(aggregateManagerFactory), "aggregate-manager"); UsesAggregateManager = false; AggregateProps = Props.Empty; return(this); }
public IFixtureArranger <TAggregate, TIdentity> For(TIdentity aggregateId) { if (aggregateId == null) { throw new ArgumentNullException(nameof(aggregateId)); } if (!AggregateEventTestProbe.IsNobody()) { throw new InvalidOperationException(nameof(AggregateEventTestProbe)); } AggregateId = aggregateId; AggregateEventTestProbe = _testKit.CreateTestProbe("aggregate-event-test-probe"); AggregateReplyTestProbe = _testKit.CreateTestProbe("aggregate-reply-test-probe"); return(this); }
public IFixtureArranger <TAggregate, TIdentity> For(TIdentity aggregateId) { if (aggregateId == null) { throw new ArgumentNullException(nameof(aggregateId)); } if (!AggregateEventTestProbe.IsNobody()) { throw new InvalidOperationException(nameof(AggregateEventTestProbe)); } AggregateId = aggregateId; AggregateEventTestProbe = _testKit.CreateTestProbe("aggregate-event-test-probe"); AggregateReplyTestProbe = _testKit.CreateTestProbe("aggregate-reply-test-probe"); AggregateProps = Props.Create <TAggregate>(args: aggregateId); AggregateRef = ActorRefs.Nobody; UsesAggregateManager = false; return(this); }