public async Task SimpleNotifyTest() { IStateManager workPlan = new StateManagerBuilder() .Add(new StateItemSuccess()) .Build(); bool result = await workPlan.Set(_workContext); result.Should().BeTrue(); workPlan.StateItems.Count.Should().Be(1); }
public async Task FailureStateFlowTest() { IStateManager workPlan = new StateManagerBuilder() .Add(new StateItemFailure()) .Build(); bool result = await workPlan.Set(_workContext); result.Should().BeFalse(); workPlan.StateItems.Count.Should().Be(1); }
public async Task SuccessTest2StateStateFlow() { IStateManager workPlan = new StateManagerBuilder() .Add(new StateItemAlreadyPresent()) .Add(new StateItemAlreadyPresent()) .Build(); bool result = await workPlan.Set(_workContext); result.Should().BeTrue(); workPlan.StateItems.Count.Should().Be(2); }