public void set_step_value_should_set_a_value_on_all_steps() { var leaf = new StepLeaf(); IStep step0 = leaf.AddNewStep(); IStep step1 = leaf.AddNewStep(); IStep step2 = leaf.AddNewStep(); IStep step3 = leaf.AddNewStep(); leaf.SetStepValue("a", "1"); step0.Get("a").ShouldEqual("1"); step1.Get("a").ShouldEqual("1"); step2.Get("a").ShouldEqual("1"); step3.Get("a").ShouldEqual("1"); }
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 SetUp() { leaf = new StepLeaf(); leaf.AddNewStep(); leaf.AddNewStep(); leaf.AddNewStep(); leaf.AddNewStep(); Cell b = Cell.For <int>("b"); b.DefaultValue = "2"; Cell a = Cell.For <int>("a"); a.DefaultValue = "3"; table = new Table("some label", "row", a, b); table.SetDefaultValueFor("b", leaf); }
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); }
public void SetUp() { leaf = new StepLeaf(); leaf.AddNewStep(); leaf.AddNewStep(); leaf.AddNewStep(); leaf.AddNewStep(); Cell b = Cell.For<int>("b"); b.DefaultValue = "2"; Cell a = Cell.For<int>("a"); a.DefaultValue = "3"; table = new Table("some label", "row", a, b); table.SetDefaultValueFor("b", leaf); }