public void Constructs_empty() { var mockRoot = MockRepository.GenerateStub<INode>(); var declaration = new NodeDeclaration(NodeAttributeCollection.Empty); var document = new NodeFragment(declaration, mockRoot); Assert.AreSame(declaration, document.Declaration); }
private void AggregateDeclaration(NodeDeclaration node, int level) { var output = new StringBuilder("<?xml"); output.Append(pendingAttribute ?? (node.Attributes.Count > 0 ? " " + Ellipsis : String.Empty)); output.Append("?>"); AddLine(output.ToString(), level); }
public void Constructs_ok() { var attribute1 = new NodeAttribute(123, "name1", "value1", 999); var attribute2 = new NodeAttribute(456, "name2", "value2", 999); var declaration = new NodeDeclaration(new[] { attribute1, attribute2 }); Assert.AreElementsSame(new[] { attribute1, attribute2 }, declaration.Attributes); }
public void Constructs_empty() { var mockRoot = MockRepository.GenerateStub <INode>(); var declaration = new NodeDeclaration(NodeAttributeCollection.Empty); var document = new NodeFragment(declaration, mockRoot); Assert.AreSame(declaration, document.Declaration); }
public override void Visit(NodeDeclaration node) { Write("{0}", node.Name); }
public void Constructs_with_empty_attributes() { var declaration = new NodeDeclaration(NodeAttributeCollection.Empty); Assert.IsEmpty(declaration.Attributes); }