public void the_attribute_for_each_step_in_the_leaf_should_be_the_default_value_of_that_cell() { leaf.AllSteps()[0].Get("b").ShouldEqual("2"); leaf.AllSteps()[1].Get("b").ShouldEqual("2"); leaf.AllSteps()[2].Get("b").ShouldEqual("2"); leaf.AllSteps()[3].Get("b").ShouldEqual("2"); }
public void clone_last_node_if_a_node_exists() { var leaf = new StepLeaf(); leaf.Add(new Step("a")); leaf.CloneLastStep().ShouldNotBeTheSameAs(leaf.AllSteps()[0]); leaf.AllSteps().Count.ShouldEqual(1); }
public void should_pick_up_children_of_child() { IStep thirdChild = theLeaf.AllSteps().ToList()[2]; StepLeaf childLeaf = thirdChild.LeafFor("grandchild"); childLeaf.AllSteps().Count.ShouldEqual(2); childLeaf.AllSteps()[0].Get("d").ShouldEqual("4"); childLeaf.AllSteps()[0].Get("e").ShouldEqual("5"); }
public void move_to_top_when_the_step_is_already_first() { var leaf = new StepLeaf(); IStep step0 = leaf.AddNewStep(); IStep step1 = leaf.AddNewStep(); IStep step2 = leaf.AddNewStep(); IStep step3 = leaf.AddNewStep(); leaf.MoveToTop(step0); leaf.AllSteps()[0].ShouldBeTheSameAs(step0); leaf.AllSteps()[1].ShouldBeTheSameAs(step1); leaf.AllSteps()[2].ShouldBeTheSameAs(step2); leaf.AllSteps()[3].ShouldBeTheSameAs(step3); }
public void move_to_bottom_when_already_last() { var leaf = new StepLeaf(); IStep step0 = leaf.AddNewStep(); IStep step1 = leaf.AddNewStep(); IStep step2 = leaf.AddNewStep(); IStep step3 = leaf.AddNewStep(); leaf.MoveToBottom(step3); leaf.AllSteps()[0].ShouldBeTheSameAs(step0); leaf.AllSteps()[1].ShouldBeTheSameAs(step1); leaf.AllSteps()[2].ShouldBeTheSameAs(step2); leaf.AllSteps()[3].ShouldBeTheSameAs(step3); }
public void add_step() { var leaf = new StepLeaf { DefaultChildStepName = "DaRow" }; IStep step = leaf.AddNewStep(); step.GrammarKey.ShouldEqual(leaf.DefaultChildStepName); leaf.AllSteps().Contains(step).ShouldBeTrue(); }
public void move_down_1() { var leaf = new StepLeaf(); IStep step0 = leaf.AddNewStep(); IStep step1 = leaf.AddNewStep(); IStep step2 = leaf.AddNewStep(); IStep step3 = leaf.AddNewStep(); leaf.MoveDown(step0); leaf.AllSteps()[0].ShouldBeTheSameAs(step1); leaf.AllSteps()[1].ShouldBeTheSameAs(step0); leaf.AllSteps()[2].ShouldBeTheSameAs(step2); leaf.AllSteps()[3].ShouldBeTheSameAs(step3); leaf.MoveDown(step0); leaf.AllSteps()[0].ShouldBeTheSameAs(step1); leaf.AllSteps()[1].ShouldBeTheSameAs(step2); leaf.AllSteps()[2].ShouldBeTheSameAs(step0); leaf.AllSteps()[3].ShouldBeTheSameAs(step3); }
public void move_up_when_the_step_is_already_first() { var leaf = new StepLeaf(); IStep step0 = leaf.AddNewStep(); IStep step1 = leaf.AddNewStep(); IStep step2 = leaf.AddNewStep(); IStep step3 = leaf.AddNewStep(); leaf.MoveUp(step0); leaf.AllSteps()[0].ShouldBeTheSameAs(step0); leaf.AllSteps()[1].ShouldBeTheSameAs(step1); leaf.AllSteps()[2].ShouldBeTheSameAs(step2); leaf.AllSteps()[3].ShouldBeTheSameAs(step3); }