示例#1
0
 public void StartEmbeddedSection(EmbeddedSection section, IStep step)
 {
     withNewNode(step, Icon.EmbeddedSection, node =>
     {
         node.AddText(section.Label);
         addRearrangeCommands(node);
         StepLeaf leaf = section.LeafFor(step);
         node.Holder   = leaf;
         _configurer.ConfigurePartAdders(node, section.Fixture, leaf);
     });
 }
示例#2
0
 public void the_step_leaf_of_the_step_for_the_embedded_section_should_be_the_holder_on_the_current_node()
 {
     treeBuilder.CurrentNode.Holder.ShouldBeTheSameAs(embedded.LeafFor(step));
 }
示例#3
0
        public void adding_an_embedded_section_then_a_sentence_under_a_paragraph_should_still_have_adder_commands()
        {
            var embedded = new EmbeddedSection(new FixtureGraph("Embed"), "the label", "embed");

            treeBuilder.StartEmbeddedSection(embedded, step);

            var sentence     = new Sentence();
            var sentenceStep = new Step();

            treeBuilder.Sentence(sentence, sentenceStep);

            nodeBuilder.AssertWasCalled(x => x.ConfigureRearrangeCommands(treeBuilder.LastNode, embedded.LeafFor(step), sentenceStep));
        }