Ejemplo n.º 1
0
        public void DoWorkflow_OnFailedJob_CallsErrorNotifier()
        {
            SetUpConditionsForCompleteWorkflow();
            _jobRunner.When(x => x.RunJob(_job)).Do(x => { throw new ProcessingException("", ErrorCode.Conversion_UnknownError); });

            _workflow.RunWorkflow(_job);

            _errorNotifier.Received().Notify(Arg.Any <ActionResult>());
        }
        public void DoWorkflow_OnFailedJob_CallsErrorNotifier()
        {
            SetUpConditionsForCompleteWorkflow();
            _jobRunner.When(x => x.RunJob(_job, Arg.Any <IOutputFileMover>())).Do(x => { throw new ProcessingException("", ErrorCode.Conversion_UnknownError); });

            _workflow.RunWorkflow(_job);

            Assert.AreEqual(ErrorCode.Conversion_UnknownError, _workflow.LastError);
        }