public void get_list_values_from_fixture() { var handling = CellHandling.Basic(); var fixture = new SelectionValuesFixture(); var model = fixture.Compile(handling); model.FindGrammar("DoAnotherThing").ShouldBeOfType<Sentence>() .FindCell("name").options.Select(x => x.value) .ShouldHaveTheSameElementsAs("Jeremy", "Monte", "Max"); }
public void get_list_values_from_fixture() { var handling = CellHandling.Basic(); var fixture = new SelectionValuesFixture(); var model = fixture.Compile(handling); model.FindGrammar("DoAnotherThing").ShouldBeOfType <Sentence>() .FindCell("name").options.Select(x => x.value) .ShouldHaveTheSameElementsAs("Jeremy", "Monte", "Max"); }
public void get_list_values_from_the_global_handling() { var handling = CellHandling.Basic(); handling.Lists["Numbers"].AddValues("1", "2", "3"); var fixture = new SelectionValuesFixture(); var model = fixture.Compile(handling); model.FindGrammar("DoSomething").ShouldBeOfType<Sentence>() .FindCell("x").options.Select(x => x.value) .ShouldHaveTheSameElementsAs("1", "2", "3"); }
public void get_list_values_when_marked_on_the_cell_type() { var handling = CellHandling.Basic(); var fixture = new SelectionValuesFixture(); var model = fixture.Compile(handling); var grammar = model.FindGrammar(nameof(SelectionValuesFixture.ChooseByType)) .ShouldBeOfType <Sentence>(); var cell = grammar.FindCell("type"); cell.options.Select(x => x.value).ShouldHaveTheSameElementsAs("Jeremy", "Monte", "Max"); }
public void get_list_values_from_the_global_handling() { var handling = CellHandling.Basic(); handling.AddSystemLevelList("Numbers", new[] { "1", "2", "3" }); var fixture = new SelectionValuesFixture(); var model = fixture.Compile(handling); model.FindGrammar("DoSomething").ShouldBeOfType <Sentence>() .FindCell("x").options.Select(x => x.value) .ShouldHaveTheSameElementsAs("1", "2", "3"); }
public void get_list_options_from_the_global_handling() { var handling = CellHandling.Basic(); var options = new[] { new Option("1", "A"), new Option("2", "B") }; handling.AddSystemLevelList("Numbers", options); var fixture = new SelectionValuesFixture(); var model = fixture.Compile(handling); model.FindGrammar("DoSomething").ShouldBeOfType<Sentence>() .FindCell("x").options .ShouldHaveTheSameElementsAs(options); }