public void CreateAttribute_uses_primitive_value_specified_by_schema() { var schema = new DomSchema("custom"); var attrDef = schema.AttributeDefinitions.AddNew("lcid"); attrDef.ValueType = typeof(int); var doc = new DomDocumentFragment().WithSchema(schema); Assert.IsInstanceOf <DomValue <int> >( doc.CreateAttribute("lcid").DomValue ); }
protected override void VisitDocumentFragment(DomDocumentFragment fragment) { using (manager.CreateSession()) { DoChildVisit(fragment, "this.__document"); } }
protected virtual void VisitDocumentFragment(DomDocumentFragment fragment) { if (fragment == null) throw new ArgumentNullException("fragment"); DefaultVisit(fragment); }
void IDomNodeVisitor.Visit(DomDocumentFragment fragment) { VisitDocumentFragment(fragment); }
public void ParentNode_should_be_null() { var doc = new DomDocumentFragment(); Assert.Null(doc.ParentElement); }
public void NodeValue_is_null() { var doc = new DomDocumentFragment(); Assert.Null(doc.NodeValue); }
public void NodeName_equals_special_name() { var doc = new DomDocumentFragment(); Assert.Equal("#document-fragment", doc.NodeName); }
public void Constructor_can_create_document_fragment_with_implicit_internal_document() { var frag = new DomDocumentFragment(); Assert.NotNull(frag.OwnerDocument); }