public void happy_path_with_no_errors()
        {
            var section = theSpecification.AddSection("PostSpec");

            section.AddStep("StartWithTheNumber").With("number", "10");
            section.AddStep("Subtract").With("operand", "2");

            afterPostProcessing();

            theSpecification.errors.Any().ShouldBeFalse();
        }
Esempio n. 2
0
        public void persist_collection_sections_within_a_step()
        {
            var step = new Step("Adding");

            step.AddCollection("Numbers").AddComment("I'm in numbers");
            step.AddCollection("Letters").AddComment("I'm in letters");


            original.AddSection("Math").Children.Add(step);

            var persistedStep = persisted
                                .Children.Single().ShouldBeOfType <Section>()
                                .Children.Single().ShouldBeOfType <Step>();

            persistedStep.Collections["Numbers"].Children
            .Single().ShouldBeOfType <Comment>()
            .Text.ShouldBe("I'm in numbers");

            persistedStep.Collections["Letters"].Children
            .Single().ShouldBeOfType <Comment>()
            .Text.ShouldBe("I'm in letters");
        }