Esempio n. 1
0
        /// <summary>
        /// Adds step with name specified by <paramref name="name"/> parameter and action specified by <paramref name="step"/> parameter to the scenario.
        /// </summary>
        /// <typeparam name="TContext">Scenario context, if specified.</typeparam>
        /// <param name="builder">Builder.</param>
        /// <param name="name">Step name to be rendered.</param>
        /// <param name="step">Step action</param>
        /// <returns>Builder.</returns>
        public static IScenarioRunner <TContext> AddStep <TContext>(this IScenarioBuilder <TContext> builder, string name, Action <TContext> step)
        {
            var integration = builder.Integrate();

            integration.Core.AddSteps(new[] { CompactStepCompiler.ToSynchronousStep(name, step) });
            return(integration);
        }
Esempio n. 2
0
 /// <summary>
 /// Adds step with name specified by <paramref name="name"/> parameter and action specified by <paramref name="step"/> parameter to the composite step.
 /// </summary>
 /// <typeparam name="TContext">Scenario context, if specified.</typeparam>
 /// <param name="builder">Builder.</param>
 /// <param name="name">Step name to be rendered.</param>
 /// <param name="step">Step action</param>
 /// <returns>Builder.</returns>
 public static ICompositeStepBuilder <TContext> AddStep <TContext>(this ICompositeStepBuilder <TContext> builder, string name, Action <TContext> step)
 {
     builder.Integrate().AddSteps(new[] { CompactStepCompiler.ToSynchronousStep(name, step) });
     return(builder);
 }