public void create_a_grammar_structure()
        {
            var grammar  = new TestServiceActionGrammar();
            var sentence = grammar.ToStructure(new FixtureLibrary()).ShouldBeOfType <Sentence>();

            sentence.ShouldEqual(Sentence.For("do something with {number}", new Cell("number", typeof(double))));
        }
        public void use_default_values()
        {
            var grammar = new TestServiceActionGrammar();

            grammar.DefaultValue = "5";
            grammar.GetCells()[0].DefaultValue.ShouldEqual("5");
        }
        public void GetCells()
        {
            var          grammar = new TestServiceActionGrammar();
            IList <Cell> cells   = grammar.GetCells();

            cells.Count.ShouldEqual(1);

            cells[0].ShouldEqual(new Cell("number", typeof(double)));
        }
        public void execute_picks_up_the_correct_cell()
        {
            var context = new TestContext();
            var service = MockRepository.GenerateMock <IService>();

            context.Store(service);

            var  grammar = new TestServiceActionGrammar();
            Step step    = new Step().With("number", "43.1");


            grammar.Execute(step, context);

            service.AssertWasCalled(x => x.DoSomething(43.1));
        }