Exemple #1
0
     public ElementTests()
     {
         collector = Substitute.For<IElementCollector>();
         upwardVisitor = Substitute.For<IUpwardElementVisitor>();
         downwardVisitor = Substitute.For<IDownwardElementVisitor>();
         sut = new Element(AnElementName, ANY_PARENT, collector);
 }
Exemple #2
0
 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;
 }
Exemple #4
0
 public RootElementTests()
 {
     aNamespaces = new Namespaces();
     collector = Substitute.For<IElementCollector>();
     sut = new RootElement(aNamespaces, collector);
     downwardVisitor = Substitute.For<IDownwardElementVisitor>();
     upwardVisitor = Substitute.For<IUpwardElementVisitor>();
 }
Exemple #5
0
 public void Accept(IDownwardElementVisitor visitor)
     => visitor.Visit(ConvertElementNameToTag(), collector.ChildrenFor(this));
Exemple #6
0
 public void Accept(IDownwardElementVisitor visitor)
 {
 }