Exemplo n.º 1
0
        public LineStatus ExecuteLine(Scenario scenario, ScenarioContext scenarioContext, string line)
        {
            DebugTrace.Trace("ScenarioLineExecter.ExecuteLine", line);
            InvocationChain chain = GetMatchingChain(scenarioContext, line);

            if (chain == null)
            {
                var suggestion = _implementationHelper.Suggest(line);

                _eventBus.Raise(new LinePending {
                    Scenario = scenario, Line = line, Suggestion = suggestion
                });
                return(LineStatus.Pending);
            }

            if (!ExecuteChain(scenario, scenarioContext, chain, line))
            {
                return(LineStatus.Failed);
            }

            _eventBus.Raise(new LinePassed {
                Scenario = scenario, Line = line
            });

            return(LineStatus.Passed);
        }
        public void Includes_comment_with_original_text()
        {
            var result = Helper.Suggest("an unimplemented method");

            result.ShouldContain("// an unimplemented method");
        }