Ejemplo n.º 1
0
        public static IStepBuilder x(this string text, Action body)
        {
            var stepDefinition = new StepDefinition
            {
                Text = text,
                Body = body == null
                    ? default(Func<IStepContext, Task>)
                    : c =>
                        {
                            body();
                            return Task.FromResult(0);
                        },
            };

            CurrentThread.StepDefinitions.Add(stepDefinition);
            return stepDefinition;
        }
Ejemplo n.º 2
0
 public static IStepBuilder x(this string text, Func<IStepContext, Task> body)
 {
     var stepDefinition = new StepDefinition { Text = text, Body = body, };
     CurrentThread.StepDefinitions.Add(stepDefinition);
     return stepDefinition;
 }