Beispiel #1
0
        public void GraphInterpreter_should_handle_failure_in_PreStart()
        {
            var setup = new FailingStageSetup(Sys, true);

            setup.StepAll();

            setup.LastEvents()
            .Should()
            .BeEquivalentTo(new Cancel(setup.Upstream), new OnError(setup.Downstream, setup.TestException()),
                            new PostStop(setup.Stage.Value));
        }
                public FailingGraphStageLogic(FailingStageSetup setup, Shape shape) : base(shape)
                {
                    _setup = setup;

                    SetHandler(setup._stageIn,
                               () => MayFail(() => Push(setup._stageOut, Grab(setup._stageIn))),
                               () => MayFail(CompleteStage),
                               ex => MayFail(() => FailStage(ex)));

                    SetHandler(setup._stageOut,
                               () => MayFail(() => Pull(setup._stageIn)),
                               () => MayFail(CompleteStage));
                }
 public GraphInterpreterFailureModesSpec(ITestOutputHelper output = null) : base(output)
 {
     var setup = new FailingStageSetup(Sys);
     downstream = setup.Downstream;
     upstream = setup.Upstream;
     stage = setup.Stage;
     testException = setup.TestException;
     lastEvents = setup.LastEvents;
     stepAll = setup.StepAll;
     failOnNextEvent = setup.FailOnNextEvent;
     failOnPostStop = setup.FailOnPostStop;
     clearEvents = setup.ClearEvents;
 }
Beispiel #4
0
        public GraphInterpreterFailureModesSpec(ITestOutputHelper output = null) : base(output)
        {
            var setup = new FailingStageSetup(Sys);

            downstream      = setup.Downstream;
            upstream        = setup.Upstream;
            stage           = setup.Stage;
            testException   = setup.TestException;
            lastEvents      = setup.LastEvents;
            stepAll         = setup.StepAll;
            failOnNextEvent = setup.FailOnNextEvent;
            failOnPostStop  = setup.FailOnPostStop;
            clearEvents     = setup.ClearEvents;
        }
 public SandwitchStage(FailingStageSetup setup)
 {
     _setup = setup;
 }
        public void GraphInterpreter_should_handle_failure_in_PreStart()
        {
            var setup = new FailingStageSetup(Sys, true);

            setup.StepAll();

            setup.LastEvents()
                .Should()
                .BeEquivalentTo(new Cancel(setup.Upstream), new OnError(setup.Downstream, setup.TestException()),
                    new PostStop(setup.Stage.Value));
        }