示例#1
0
            public ScenarioDefinition()
            {
                _activators.Add(new ServiceLocatorTagRequestActivator(_services));
                Naming = new DefaultElementNamingConvention();

                _services.Add <ITypeResolver>(new TypeResolver());
            }
        public void SetUp()
        {
            var library = new DefaultHtmlConventions().Library;

            var namingConventions = new DefaultElementNamingConvention();

            var activators = new ElementIdActivator(namingConventions);

            theTemplates = new TemplateWriter(new ActiveProfile(), library, new TagRequestBuilder(new []{activators}));
        }
示例#3
0
        public void SetUp()
        {
            var library = new DefaultHtmlConventions().Library;

            var namingConventions = new DefaultElementNamingConvention();

            var activators = new ElementIdActivator(namingConventions);

            theTemplates = new TemplateWriter(new ActiveProfile(), library, new TagRequestBuilder(new [] { activators }));
        }
示例#4
0
        public void use_the_prefix_in_determining_element_names()
        {
            var naming    = new DefaultElementNamingConvention();
            var generator = new TagGenerator <AddressViewModel>(new TagProfileLibrary(), naming, null)
            {
                Model         = new AddressViewModel(),
                ElementPrefix = "Site"
            };

            generator.GetRequest(x => x.Address.Address1).ElementId.ShouldEqual("SiteAddressAddress1");
        }