public AddCollection ( string key ) : |
||
key | string | |
return |
public void step_that_has_collections() { var step = new Step("Adding"); var section = step.AddCollection("Numbers"); section.AddComment("foo!"); section.AddComment("bar!"); Debug.WriteLine(step.ToJson()); }
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"); }