public void EstablishBaseContext() { this.Template = new Template(new[] { "path" }); this.ComponentLibrary = MockRepository.GenerateStub <IComponentSpecificationLibrary>(); this.ComponentSpecification = MockRepository.GenerateStub <IComponentSpecification <IComponentWithProperties> >(); this.ComponentLibrary.Stub(l => l.Lookup(Arg <string> .Is.Anything)).Return(this.ComponentSpecification); this.Visitor = new AmendmentApplyingVisitor(this.Template, this.ComponentLibrary); }
public ComponentTypeResource Build(IComponentSpecification<IComponentWithProperties> component) { return new ComponentTypeResource { Name = component.Name, Category = component.Category, Type = component.Accept(this.namingVisitor), Links = new[] { new LinkResource { Rel = "self", Href = "/_kola/component-types/" + component.Name.Urlify() } } }; }
public ComponentTypeResource Build(IComponentSpecification <IComponentWithProperties> component) { return(new ComponentTypeResource { Name = component.Name, Category = component.Category, Type = component.Accept(this.namingVisitor), Links = new[] { new LinkResource { Rel = "self", Href = "/_kola/component-types/" + component.Name.Urlify() } } }); }