Beispiel #1
0
        public void GetProcessorNotFoundTest()
        {
            // Arrange
            var actions = GetProcessors();
            var factory = new WorkflowActionFactory <SimpleWorkflowState>(processors: actions);

            // Act
            var actual = factory.GetProcessor(1.GetType());

            // Assert
            Assert.Null(actual);
        }
Beispiel #2
0
        public void GetProcessorTypeArgTest()
        {
            // Arrange
            var actions  = GetProcessors();
            var expected = actions[1];
            var factory  = new WorkflowActionFactory <SimpleWorkflowState>(processors: actions);

            // Act
            var actual = factory.GetProcessor <SecondProcessor>();

            // Assert
            Assert.Equal(expected, actual);
            Assert.NotEqual(actions.Last(), actual);
        }