public async Task Step(string description, Func <Task> action, [CallerFilePath] string filePath = "", [CallerMemberName] string methodName = "", [CallerLineNumber] int lineNumber = 0) { var context = new StepContext { ScenarioName = _scenarioName, StepFilePath = filePath, StepLineNumber = lineNumber, StepMethodName = methodName }; await _stepExecutor.Step(_scenarioName, description, action, context); }
public Task Step(string scenarioName, string stepDescription, Func <Task> action, StepContext stepContext) { return(_scenarioStepExecutorImplementation.Step($"{_scenarioPrefix}: {scenarioName}", $"{_stepPrefix} {stepDescription}", action, stepContext)); }
public async Task Step(string scenarioName, string stepDescription, Func <Task> action, StepContext stepContext) { using var level = _counter.StartLevel(stepContext.ScenarioName); var decoratedDescription = DecorateDescription(stepDescription, level); await _scenarioStepExecutorImplementation.Step(scenarioName, decoratedDescription, action, stepContext); }