public void execute_delegates() { var action = MockRepository.GenerateMock <System.Action <ISpecContext> >(); var grammar = new ActionGrammar("do something", action); var context = SpecContext.ForTesting(); grammar.Execute(new StepValues("foo"), context).ToArray(); action.AssertWasCalled(x => x.Invoke(context)); }
public void execute_delegates() { var action = Substitute.For <System.Action <ISpecContext> >(); var grammar = new ActionGrammar("do something", action); var context = SpecContext.ForTesting(); grammar.Execute(new StepValues("foo"), context).ToArray(); action.Received().Invoke(context); }
public void executing_should_call_the_inner_grammar_action() { grammar.Execute(new Step()); wasExecuted.ShouldBeTrue(); }