Пример #1
0
        public async void SelectorSetsNext()
        {
            // Arrange
            var selector       = new BaseSelector();
            var expectedOption = new BaseStep(name: "expectedOption");
            var option         = new BaseStep(name: "option");
            var options        = new List <Step <SimpleWorkflowState> >()
            {
                expectedOption, option
            };

            selector.SetOptions(options);

            // Act
            var result = await selector.Execute(_workflowState);

            // Assert
            Assert.Single(result.WorkflowChain);
            Assert.Equal(_originalWorfklowState, result.State);
            Assert.Equal(selector.Next(), expectedOption);
        }