public ElementTests() { collector = Substitute.For<IElementCollector>(); upwardVisitor = Substitute.For<IUpwardElementVisitor>(); downwardVisitor = Substitute.For<IDownwardElementVisitor>(); sut = new Element(AnElementName, ANY_PARENT, collector); }
public RootElementTests() { aNamespaces = new Namespaces(); collector = Substitute.For<IElementCollector>(); sut = new RootElement(aNamespaces, collector); downwardVisitor = Substitute.For<IDownwardElementVisitor>(); upwardVisitor = Substitute.For<IUpwardElementVisitor>(); }
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; }
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; }
/// <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)); }