コード例 #1
0
        private void MakeStepArgList()
        {
            if (origArgList.Count > 0)
            {
                return;                         // step argument list has been created
            }
            if (DocStringArg != null)
            {
                BDDStepArg arg = new BDDStepArg(BDDStepArg.DocStringArg);
                origArgList.Add(arg);
            }

            int numArg = 1;
            int strArg = 1;

            MatchCollection matches = stepRegex.Matches(StepText);

            foreach (Match match in matches)
            {
                BDDStepArg arg = new BDDStepArg(match.Value);
                if ((arg.ArgType == BDDStepArgType.IntArg) || (arg.ArgType == BDDStepArgType.FloatArg))
                {
                    arg.ArgIndex = numArg++;
                }
                else if (arg.ArgType == BDDStepArgType.StringArg)
                {
                    arg.ArgIndex = strArg++;
                }
                origArgList.Add(arg);
            }
        }
コード例 #2
0
        private void MakeAdjustedArgList()
        {
            adjustdArgList = new List <BDDStepArg>();
            if (TableArg != null)
            {
                adjustdArgList.Add(new BDDStepArg(BDDStepArg.TableArg));
            }

            BDDStepArg tableRowArg = origArgList.Find(x => x.ArgType == BDDStepArgType.TableColumnArg);

            if (tableRowArg != null)
            {
                adjustdArgList.Add(tableRowArg);
            }

            foreach (BDDStepArg stepArg in origArgList)
            {
                if ((stepArg.ArgType != BDDStepArgType.TableArg) && (stepArg.ArgType != BDDStepArgType.TableColumnArg))
                {
                    adjustdArgList.Add(stepArg);
                }
            }
        }