public ElementTests() { collector = Substitute.For<IElementCollector>(); upwardVisitor = Substitute.For<IUpwardElementVisitor>(); downwardVisitor = Substitute.For<IDownwardElementVisitor>(); sut = new Element(AnElementName, ANY_PARENT, collector); }
public void Accept(IDownwardElementVisitor visitor) { visitor.Visit(namespaces); foreach (var child in collector.ChildrenFor(this)) { child.Accept(visitor); } }
public DynamicForwardXmlCreator(IDownwardElementVisitor downwardVisitor) { if (downwardVisitor == null) { throw new ArgumentNullException(nameof(downwardVisitor)); } this.downwardVisitor = downwardVisitor; }
public RootElementTests() { aNamespaces = new Namespaces(); collector = Substitute.For<IElementCollector>(); sut = new RootElement(aNamespaces, collector); downwardVisitor = Substitute.For<IDownwardElementVisitor>(); upwardVisitor = Substitute.For<IUpwardElementVisitor>(); }
public void Accept(IDownwardElementVisitor visitor) => visitor.Visit(ConvertElementNameToTag(), collector.ChildrenFor(this));
public void Accept(IDownwardElementVisitor visitor) { }