Esempio n. 1
0
        public async Task SuccessTestFailedStateFlow()
        {
            IStateManager workPlan = new StateManagerBuilder()
                                     .Add(new StateItemFailure())
                                     .Build();

            StateContext stateContext = await workPlan.TestAsync(_workContext);

            stateContext.Should().NotBeNull();

            const int count = 1;

            stateContext.WorkItemIndex.Should().Be(0);
            workPlan.IsRunning.Should().BeFalse();
            workPlan.StateItems.Count.Should().Be(count);
            workPlan.IsSuccessful.Should().BeFalse();
        }