protected override void When()
        {
            MockFirstTask
            .GetRunCount()
            .Returns(_runCountFirst);
            MockFirstTask
            .Run()
            .Returns(SequenceResultEnum.Success);

            MockSecondTask
            .GetRunCount()
            .Returns(_runCountSecond);
            MockSecondTask
            .Run()
            .Returns(SequenceResultEnum.Success);

            MockThirdTask
            .GetRunCount()
            .Returns(_runCountThird);
            MockThirdTask
            .Run()
            .Returns(SequenceResultEnum.Success);

            _result = SUT.Run();
        }
예제 #2
0
        protected override void When()
        {
            _mockRecoveryTask = Substitute.For <IRunnable>();
            _mockRecoveryTask
            .Run()
            .Returns(SequenceResultEnum.Fail);
            _recoveryOptions = new RecoveryOptionsDto(true, _mockRecoveryTask.Run);

            MockFirstTask
            .GetRunCount()
            .Returns(_runCountFirst);
            MockFirstTask
            .Run()
            .Returns(SequenceResultEnum.Success);

            MockSecondTask
            .GetRunCount()
            .Returns(_runCountSecond);
            MockSecondTask
            .Run()
            .Returns(SequenceResultEnum.Success);

            MockThirdTask
            .RecoveryOptions
            .Returns(_recoveryOptions);
            MockThirdTask
            .GetRunCount()
            .Returns(_runCountThird);
            MockThirdTask
            .Run()
            .Returns(SequenceResultEnum.Fail);

            _result = SUT.Run();
        }
예제 #3
0
        protected override void When()
        {
            _recoveryOptions = new RecoveryOptionsDto();

            MockFirstTask
            .GetRunCount()
            .Returns(_runCountFirst);
            MockFirstTask
            .Run()
            .Returns(SequenceResultEnum.Success);

            MockSecondTask
            .GetRunCount()
            .Returns(_runCountSecond);
            MockSecondTask
            .Run()
            .Returns(SequenceResultEnum.Success);

            MockThirdTask
            .RecoveryOptions
            .Returns(_recoveryOptions);
            MockThirdTask
            .GetRunCount()
            .Returns(_runCountThird);
            MockThirdTask
            .Run()
            .Returns(SequenceResultEnum.Fail);

            _result = SUT.Run();
        }