Esempio n. 1
0
        public static StepResult Run(this CriterionStep step, IXmlRpcClient proxy)
        {
            var keyword = new Keyword(step, proxy, Behavior.Config) ;

            var result = new StepResult();

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

                ret.KeywordName = step.Keyword + " " + step.InsertValues();

                return ret;
            }

            return new StepResult(keyword);
        }
Esempio n. 2
0
        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);
        }