public void SetUp()
        {
            var atomSpecification = new AtomSpecification("atom 1");
            atomSpecification.AddProperty(new PropertySpecification("property 1 name", "property 1 type", string.Empty));
            atomSpecification.AddProperty(new PropertySpecification("property 2 name", "property 2 type", "property 2 default"));

            this.atom = atomSpecification.Create();
        }
Ejemplo n.º 2
0
        public ComponentConfigurer Atom(string componentName)
        {
            var specification = new AtomSpecification(componentName);

            this.configuration.Add(specification);

            return(new ComponentConfigurer(specification));
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            var atomSpecification = new AtomSpecification("atom 1");

            atomSpecification.AddProperty(new PropertySpecification("property 1 name", "property 1 type", string.Empty));
            atomSpecification.AddProperty(new PropertySpecification("property 2 name", "property 2 type", "property 2 default"));

            this.atom = atomSpecification.Create();
        }
Ejemplo n.º 4
0
        private void SetUpAtom(string name)
        {
            var specification = new AtomSpecification(name)
            {
                ViewName = name
            };

            this.ComponentLibrary.Stub(l => l.Lookup(name)).Return(specification);

            this.RendererFactory.Stub(f => f.GetAtomRenderer(name)).Return(new DefaultRenderer(specification));
        }
Ejemplo n.º 5
0
        public void SetUp()
        {
            var template = new Template(new[] { "test", "path" });
            this.ContentRepository.Stub(r => r.GetTemplate(Arg<IEnumerable<string>>.List.Equal(new[] { "test", "path" }))).Return(template);

            var componentSpecification = new AtomSpecification("atom name");
            this.ComponentLibrary.Stub(r => r.Lookup("atom name")).Return(componentSpecification);

            this.Response = this.Browser.Post("/_kola/templates/amendments",
                with =>
                    {
                        with.Query("templatePath", "/test/path");
                        with.Query("amendmentType", "addComponent");
                        with.JsonBody(new
                        {
                            targetPath = "0",
                            componentType = "atom name"
                        });
                        with.Header("Accept", "application/json");
                    });
        }
Ejemplo n.º 6
0
        public void SetUp()
        {
            var template = new Template(new[] { "test", "path" });

            this.ContentRepository.Stub(r => r.GetTemplate(Arg <IEnumerable <string> > .List.Equal(new[] { "test", "path" }))).Return(template);

            var componentSpecification = new AtomSpecification("atom name");

            this.ComponentLibrary.Stub(r => r.Lookup("atom name")).Return(componentSpecification);

            this.Response = this.Browser.Post("/_kola/templates/amendments",
                                              with =>
            {
                with.Query("templatePath", "/test/path");
                with.Query("amendmentType", "addComponent");
                with.JsonBody(new
                {
                    targetPath    = "0",
                    componentType = "atom name"
                });
                with.Header("Accept", "application/json");
            });
        }
Ejemplo n.º 7
0
        private void SetUpAtom(string name)
        {
            var specification = new AtomSpecification(name) { ViewName = name };

            this.ComponentLibrary.Stub(l => l.Lookup(name)).Return(specification);

            this.RendererFactory.Stub(f => f.GetAtomRenderer(name)).Return(new DefaultRenderer(specification));
        }
 public string Visit(AtomSpecification atomSpecification)
 {
     return("atom");
 }