示例#1
0
 public StepDefinition(Regex regex, Delegate action, StepKinds kind, IProvideSteps stepSet)
     : base(regex, action)
 {
     Kind = kind;
     StepSet = stepSet;
 }
示例#2
0
        public void AdoptSteps(IProvideSteps stepSet)
        {
            try
            {
                stepSet.WorldView = worldViews[stepSet.WorldViewType];
            }
            catch (KeyNotFoundException e)
            {
                throw new UnInitializedWorldViewException(stepSet.WorldViewType.Name + " may not have been initialized");
            }
            givens = givens.Union(stepSet.StepDefinitions.Givens).ToList();
            whens = whens.Union(stepSet.StepDefinitions.Whens).ToList();
            thens = thens.Union(stepSet.StepDefinitions.Thens).ToList();

            transforms = transforms.Union(stepSet.TransformDefinitions).ToList();
        }