示例#1
0
        public void build_tag_with_multiple_modifiers()
        {
            var plan = new TagPlan(new ByNameBuilder(),
                                   new ITagModifier[] { new FakeAddClass(1, "a"), new FakeAddClass(2, "b") },
                                   new DefaultElementNamingConvention());

            plan.Build(new FakeSubject {
                Name = "Malcolm Reynolds"
            })
            .ToString().ShouldEqual("<div id=\"Malcolm Reynolds\" class=\"a b\"></div>");
        }
示例#2
0
        public void build_tag_with_wrapper()
        {
            var plan = new TagPlan <FakeSubject>(new ByNameBuilder(),
                                                 new ITagModifier <FakeSubject>[] { new FakeAddClass(1, "a"), new FakeAddClass(2, "b"), new WrapWithDiv() });

            plan.Build(new FakeSubject
            {
                Name = "Malcolm Reynolds"
            })
            .ToString().ShouldEqual("<div class=\"wrapper\"><div id=\"Malcolm Reynolds\" class=\"a b\"></div></div>");
        }