public void AddStep(Expression <Func <TScenario, Task> > stepAction, string stepTextTemplate, bool includeInputsInStepTitle, bool reports, ExecutionOrder executionOrder, bool asserts, string stepPrefix) { var action = stepAction.Compile(); var inputArguments = new StepArgument[0]; if (includeInputsInStepTitle) { inputArguments = stepAction.ExtractArguments(_testObject).ToArray(); } var args = inputArguments.Where(s => !string.IsNullOrEmpty(s.Name)).ToList(); _steps.Add(new Step(stepAction, StepActionFactory.GetStepAction(action), _createTitle, stepTextTemplate, stepPrefix, includeInputsInStepTitle, GetMethodInfo, _testObject, null, FixAsserts(asserts, executionOrder), FixConsecutiveStep(executionOrder), reports, args)); }
public void ResetTitle() { if (_stepAction != null) { var action = _stepAction.Compile(); var inputArguments = new StepArgument[0]; if (_includeInputsInStepTitle) { inputArguments = _stepAction.ExtractArguments(_testObject).ToArray(); } _title = _createTitle(_stepTextTemplate, _includeInputsInStepTitle, _getMethodInfo(_stepAction), inputArguments, _stepPrefix); } }
private void AddStep(Action <TScenario> action, LambdaExpression stepAction, string stepTextTemplate, bool includeInputsInStepTitle, bool reports, ExecutionOrder executionOrder, bool asserts, string stepPrefix) { var inputArguments = new StepArgument[0]; if (includeInputsInStepTitle) { inputArguments = stepAction.ExtractArguments(_testObject).ToArray(); } var title = CreateTitle(stepTextTemplate, includeInputsInStepTitle, GetMethodInfo(stepAction), inputArguments, stepPrefix); var args = inputArguments.Where(s => !string.IsNullOrEmpty(s.Name)).ToList(); _steps.Add(new Step(StepActionFactory.GetStepAction(action), title, FixAsserts(asserts, executionOrder), FixConsecutiveStep(executionOrder), reports, args)); }