public DecoratedGrammarFixture()
        {
            this["GoSlowly"] = new DecoratedLineGrammar(this["Go"].As<LineGrammar>())
            {
                Suffix = " slowly"
            };

            this["MustGoQuickly"] = new DecoratedLineGrammar(this["Go"].As<LineGrammar>())
            {
                Prefix = "Must ",
                Suffix = " quickly"
            };
        }
Ejemplo n.º 2
0
        public DecoratedGrammarFixture()
        {
            this["GoSlowly"] = new DecoratedLineGrammar(this["Go"].As <LineGrammar>())
            {
                Suffix = " slowly"
            };

            this["MustGoQuickly"] = new DecoratedLineGrammar(this["Go"].As <LineGrammar>())
            {
                Prefix = "Must ",
                Suffix = " quickly"
            };
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            stepHistory.Clear();

            var simple = new ActionGrammar("Inner", () => stepHistory.Add("INNER"));

            grammar = new DecoratedLineGrammar(simple)
            {
                Before = (s, c) => stepHistory.Add("Before"),
                After  = (s, c) => stepHistory.Add("After"),
                Prefix = "Pre ",
                Suffix = " Post"
            };
        }