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(); }
public ComponentConfigurer Atom(string componentName) { var specification = new AtomSpecification(componentName); this.configuration.Add(specification); return(new ComponentConfigurer(specification)); }
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 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"); }); }
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"); }); }
public string Visit(AtomSpecification atomSpecification) { return("atom"); }