示例#1
0
     public ElementTests()
     {
         collector = Substitute.For<IElementCollector>();
         upwardVisitor = Substitute.For<IUpwardElementVisitor>();
         downwardVisitor = Substitute.For<IDownwardElementVisitor>();
         sut = new Element(AnElementName, ANY_PARENT, collector);
 }
示例#2
0
 public RootElementTests()
 {
     aNamespaces = new Namespaces();
     collector = Substitute.For<IElementCollector>();
     sut = new RootElement(aNamespaces, collector);
     downwardVisitor = Substitute.For<IDownwardElementVisitor>();
     upwardVisitor = Substitute.For<IUpwardElementVisitor>();
 }
示例#3
0
 public RootElement(Namespaces namespaces, IElementCollector collector)
 {
     if (namespaces == null)
     {
         throw new ArgumentNullException(nameof(namespaces));
     }
     if (collector == null)
     {
         throw new ArgumentNullException(nameof(collector));
     }
     this.namespaces = namespaces;
     this.collector = collector;
 }
示例#4
0
 public Element(ElementName elementName, IElement parent, IElementCollector collector)
 {
     if (elementName == null)
     {
         throw new ArgumentNullException(nameof(elementName));
     }
     if (parent == null)
     {
         throw new ArgumentNullException(nameof(parent));
     }
     if (collector == null)
     {
         throw new ArgumentNullException(nameof(collector));
     }
     this.elementName = elementName;
     this.parent = parent;
     this.collector = collector;
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ElementRetriever"/> class.
 /// </summary>
 /// <param name="collector">The element collector</param>
 /// <param name="classMapper">The class mapper</param>
 public ElementRetriever([NotNull] IElementCollector collector, [NotNull] IRvtClassMapper classMapper)
 {
     _classMapper = classMapper ?? throw new ArgumentNullException(nameof(classMapper));
     _collector   = collector ?? throw new ArgumentNullException(nameof(collector));
 }