public void accept_visitor() { var executor = MockRepository.GenerateMock<IStepExecutor>(); var step = new InvalidGrammarStep(new StepValues("foo"), "grammar is wonky"); step.AcceptVisitor(executor); executor.AssertWasCalled(x => x.Line(step)); }
public void accept_visitor() { var executor = Substitute.For<ILineStepGatherer>(); var step = new InvalidGrammarStep(new StepValues("foo"), "grammar is wonky"); step.AcceptVisitor(executor); executor.Received().Line(step); }
public void execute_logs_a_step_result_error() { var context = SpecContext.ForTesting(); var step = new InvalidGrammarStep(new StepValues("the id"), "grammar is wonky"); step.Execute(context); var result = context.Results.Single().ShouldBeOfType<StepResult>(); result.id.ShouldBe("the id"); result.status.ShouldBe(ResultStatus.error); result.error.ShouldBe("grammar is wonky"); }
protected bool Equals(InvalidGrammarStep other) { return string.Equals(_values.id, other._values.id) && string.Equals(Message, other.Message); }
protected bool Equals(InvalidGrammarStep other) { return(string.Equals(_values.id, other._values.id) && string.Equals(Message, other.Message)); }