Exemplo n.º 1
0
        public void binding_works_under_package_context()
        {
            var serieZ = _pak1TemplateRegistry.FirstByName("SerieZ");

            serieZ.Descriptor = new SparkDescriptor(serieZ);
            serieZ.Descriptor.As <SparkDescriptor>().AddBinding(_pak1TemplateRegistry.First(x => x.Name() == "bindings"));
            serieZ.Descriptor.As <SparkDescriptor>().AddBinding(_appTemplateRegistry.First(x => x.Name() == "bindings"));
            renderTemplate(serieZ).ShouldEqual("SerieZ Hi from Package1 Bye from Host");
        }
Exemplo n.º 2
0
        public void master_is_the_closest_ancestor_with_the_specified_name_in_shared_1()
        {
            var template = _templateRegistry.First();

            _request.Target = template;

            ClassUnderTest.Bind(_request);
            _templateRegistry.ElementAt(2).ShouldEqual(template.Descriptor.As <ViewDescriptor>().Master);
        }