Grammar object that performs an action silently
Inheritance: IGrammar
Esempio n. 1
0
        public void calls_the_action_upon_execute()
        {
            var address = new Address();
            var grammar = new DoGrammar((s, c) => c.CurrentObject = address);

            var context = new TestContext();
            grammar.Execute(new Step(), context);

            context.CurrentObject.ShouldBeTheSameAs(address);
        }
Esempio n. 2
0
 public void creates_a_dogrammar_structure()
 {
     var grammar = new DoGrammar((s, c) => { });
     grammar.ToStructure(null).ShouldBeOfType<DoGrammarStructure>();
 }