Example #1
0
        public void can_customize_cell_display_and_usage()
        {
            var fixture  = new AddressBuilderFixture();
            var model    = fixture.Compile(CellHandling.Basic());
            var sentence = model.FindGrammar("City").As <Sentence>();

            sentence.cells[0].options.Length.ShouldBe(3);
            sentence.cells[0].editor.ShouldBe("select");
        }
Example #2
0
        public void can_compile_a_fixture_with_a_mix_of_fields_and_properties()
        {
            var fixture = new AddressBuilderFixture();

            fixture.Compile(CellHandling.Basic());

            fixture["City"].ShouldBeOfType <SetMemberGrammar>();
            fixture["County"].ShouldBeOfType <SetMemberGrammar>();
            fixture["Area.Name"].ShouldBeOfType <SetMemberGrammar>();
        }