public void Visit(SetPropertyFixedAmendment amendment) { var component = this.componentCollection.FindComponentWithProperties(amendment.ComponentPath); var specification = this.specificationLibrary.Lookup(component.Name); var property = component.FindOrCreateProperty(specification.Properties.Find(amendment.PropertyName)); property.Value = new FixedPropertyValue(amendment.FixedValue); }
public AmendmentSurrogate Visit(SetPropertyFixedAmendment amendment) { return(new SetPropertyFixedAmendmentSurrogate { ComponentPath = amendment.ComponentPath.ToComponentPathString(), PropertyName = amendment.PropertyName, FixedValue = amendment.FixedValue }); }
public AmendmentResource Visit(SetPropertyFixedAmendment amendment, int index) { return(new SetPropertyFixedAmendmentResource { Id = index, ComponentPath = amendment.ComponentPath.ToComponentPathString(), PropertyName = amendment.PropertyName, Value = amendment.FixedValue, Links = this.BuildLinks(amendment, index) }); }
public void SetUp() { this.Template.Insert(0, new Atom("the atom", Enumerable.Empty <Property>())); var propertiespecification = new PropertySpecification("property name", "property type", string.Empty); this.ComponentSpecification.Stub(s => s.Properties).Return(new[] { propertiespecification }); var amendment = new SetPropertyFixedAmendment(new[] { 0 }, "property name", "updated value"); this.Visitor.Visit(amendment); }
public void SetUp() { this.Template.Insert(0, new Atom("the atom", Enumerable.Empty<Property>())); var propertiespecification = new PropertySpecification("property name", "property type", string.Empty); this.ComponentSpecification.Stub(s => s.Properties).Return(new[] { propertiespecification }); var amendment = new SetPropertyFixedAmendment(new[] { 0 }, "property name", "updated value"); this.Visitor.Visit(amendment); }