Ejemplo n.º 1
0
        public async Task IfActionExecutesThenIfConditionIsTrue()
        {
            // Arrange
            var then = new List <BlockConfig>()
            {
                new()
                {
                    Type = "testing.test",
                }
            };
            var arguments = new IfArguments
            {
                If   = true.ToConstantParameter(),
                Then = then,
            };

            // Act
            await Act("if", arguments);

            // Assert
            flowActorMock.Verify(o => o.Act(then, flowContextMock.Object));
        }
Ejemplo n.º 2
0
        public async Task IfActionExecutesElseIfConditionIsFalse()
        {
            // Arrange
            var @else = new List <BlockConfig>()
            {
                new()
                {
                    Type = "testing.test",
                }
            };
            var arguments = new IfArguments
            {
                If   = false.ToConstantParameter(),
                Else = @else,
            };

            // Act
            await Act("if", arguments);

            // Assert
            flowActorMock.Verify(o => o.Act(@else, flowContextMock.Object));
        }