public void TestEscalate()
        {
            var failureControlTestResults = new FailureControlActor.FailureControlTestResults();
            var failure = TestWorld.ActorFor <IFailureControl>(
                Definition.Has <FailureControlActor>(
                    Definition.Parameters(failureControlTestResults), "failure"));
            var exception  = new ApplicationException("Failed");
            var supervised = new StageSupervisedActor <IFailureControl>(failure.ActorInside, exception);

            supervised.Escalate();

            Assert.Equal(1, failureControlTestResults.StoppedCount.Get());
        }
Ejemplo n.º 2
0
        public void TestEscalate()
        {
            var failureControlTestResults = new FailureControlActor.FailureControlTestResults();
            var failure = TestWorld.ActorFor <IFailureControl>(
                Definition.Has <FailureControlActor>(
                    Definition.Parameters(failureControlTestResults), "failure"));
            var exception  = new ApplicationException("Failed");
            var supervised = new StageSupervisedActor <IFailureControl>(failure.ActorInside, exception);

            var access = failureControlTestResults.AfterCompleting(1);

            supervised.Escalate();

            Assert.Equal(1, access.ReadFrom <int>("stoppedCount"));
        }