Exemplo n.º 1
0
        public void should_add_default_option_to_top_of_list()
        {
            var tag = new SelectTag();
            tag.Option("a", "1");
            tag.Option("b", "2");

            tag.DefaultOption("bar");

            tag.Children[0].Text().ShouldEqual("bar");
        }
Exemplo n.º 2
0
        public void should_add_default_option_to_top_of_list()
        {
            var tag = new SelectTag();

            tag.Option("a", "1");
            tag.Option("b", "2");

            tag.DefaultOption("bar");

            tag.Children[0].Text().ShouldEqual("bar");
        }
Exemplo n.º 3
0
        public void should_make_the_default_option_selected()
        {
            var tag = new SelectTag();
            tag.Option("a", "1");
            tag.Option("b", "2");

            tag.DefaultOption("bar");

            tag.Children[0].Attr("selected").ShouldEqual("selected");
            tag.Children[1].HasAttr("selected").ShouldBeFalse();
            tag.Children[2].HasAttr("selected").ShouldBeFalse();
        }
Exemplo n.º 4
0
        public void should_make_the_default_option_selected()
        {
            var tag = new SelectTag();

            tag.Option("a", "1");
            tag.Option("b", "2");

            tag.DefaultOption("bar");

            tag.Children[0].Attr("selected").ShouldEqual("selected");
            tag.Children[1].HasAttr("selected").ShouldBeFalse();
            tag.Children[2].HasAttr("selected").ShouldBeFalse();
        }