コード例 #1
0
        public void Should_Not_Execute_If_Required_Step_Failed()
        {
            Workflow.Add <DependentStep>();
            Workflow.Add <RequiredStep>();
            TestFlags.Add("FailStep1", true);

            Workflow.Execute(Context);

            Workflow.FailedSteps.Should().HaveCount(2);
            Context.Out.DidNotReceive().Executed(Arg.Any <DependentStep>());
        }
コード例 #2
0
        public void Should_Not_Execute_When_All_Required_Steps_Failed()
        {
            Workflow.Add <MultiDependentStep>();
            Workflow.Add <RequiredStep>();
            Workflow.Add <AnotherRequiredStep>();
            TestFlags.Add("FailStep1", true);
            TestFlags.Add("FailStep2", true);

            Workflow.Execute(Context);

            Output.DidNotReceive().Executed(Arg.Any <MultiDependentStep>());
        }