public static InteractionResult Run(this Interaction interaction, IRemoteClient proxy)
        {
            var keyword = new Keyword(interaction, proxy, Behavior.Config) { ReturnName = interaction.ReturnName };

            var result = new InteractionResult();

            if (keyword.KeywordExists && keyword.ParametersAreCorrect)
            {
                result = keyword.Run();

                if (interaction.ExpectFailure)
                {
                    if (result.Result.status.ToLower().Equals("pass"))
                        return new InteractionResult(Result.CreateFail("Expected failure, but interaction incorrectly passed."));
                    else
                        return new InteractionResult(Result.CreatePass("Interaction failed correctly with: " + result.Result.error));
                }

                return result;
            }

            return new InteractionResult(keyword);
        }
Beispiel #2
0
 public InteractionReport(InteractionResult interactionResult)
 {
     InteractionResult = interactionResult;
 }