public GuidPingActor(GuidTestResults testResults, int maxPings) { _testResults = testResults; _maxPings = maxPings; _pong = ChildActorFor <IPong>(() => new GuidPongActor(testResults)); _pings = 0; _ping = SelfAs <IPing>(); }
public void TestThatActorsAreOperational() { var testResults = new GuidTestResults(); var access = testResults.AfterCompleting(_maxPings * 2); var ping = _world.ActorFor <IPing>(() => new GuidPingActor(testResults, _maxPings)); ping.Ping(); var pingCount = access.ReadFrom <int>("pingCount"); var pongCount = access.ReadFrom <int>("pongCount"); Assert.Equal(pingCount, pongCount); }
public GuidPongActor(GuidTestResults testResults) => _testResults = testResults;