示例#1
0
        public void relay_a_paragraph()
        {
            var sentence1 = new Sentence
            {
                Name = "1"
            };
            var sentence2 = new Sentence
            {
                Name = "2"
            };
            var sentence3 = new Sentence
            {
                Name = "3"
            };

            GrammarAndStep <Paragraph> context = runStep <Paragraph>(x =>
            {
                x.AddStructure(sentence1);
                x.AddStructure(sentence2);
                x.AddStructure(sentence3);
            });

            stream.AssertWasCalled(x => x.StartParagraph(context.Grammar, context.Step));

            stream.AssertWasCalled(x => x.Sentence(sentence1, context.Step));
            stream.AssertWasCalled(x => x.Sentence(sentence2, context.Step));
            stream.AssertWasCalled(x => x.Sentence(sentence3, context.Step));

            stream.AssertWasCalled(x => x.EndParagraph(context.Grammar, context.Step));
        }
示例#2
0
        public void relay_embedded_section_start_and_finish()
        {
            GrammarAndStep <EmbeddedSection> context = runStep <EmbeddedSection>(x =>
            {
                x.Fixture  = new FixtureGraph("embedded");
                x.LeafName = "leaf";
            });

            stream.AssertWasCalled(x => x.StartEmbeddedSection(context.Grammar, context.Step));
            stream.AssertWasCalled(x => x.EndEmbeddedSection(context.Grammar, context.Step));
        }
示例#3
0
        public void run_a_table()
        {
            GrammarAndStep <Table> context = runStep <Table>(null);

            stream.AssertWasCalled(x => x.Table(context.Grammar, context.Step));
        }
示例#4
0
        public void run_a_set_verification()
        {
            GrammarAndStep <SetVerification> context = runStep <SetVerification>(null);

            stream.AssertWasCalled(x => x.SetVerification(context.Grammar, context.Step));
        }
示例#5
0
        public void run_a_sentence()
        {
            GrammarAndStep <Sentence> context = runStep <Sentence>(null);

            stream.AssertWasCalled(x => x.Sentence(context.Grammar, context.Step));
        }