Exemple #1
0
        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 args = inputArguments.Where(s => !string.IsNullOrEmpty(s.Name)).ToList();

            _steps.Add(new Step(stepAction, stepTextTemplate, includeInputsInStepTitle, GetMethodInfo, stepPrefix, _createTitle, StepActionFactory.GetStepAction(action), null, FixAsserts(asserts, executionOrder),
                                FixConsecutiveStep(executionOrder), reports, args));
        }