public void test_add_annotation_nominal()
 {
     DomDocument d = new DomDocument();
     d.AddAnnotation(DBNull.Value);
     Assert.True(d.HasAnnotation<DBNull>());
     Assert.That(d.Annotations<DBNull>(), Is.Not.Empty);
     Assert.That(d.Annotations<Uri>(), Is.Empty);
     Assert.That(d.Annotation<DBNull>(), Is.EqualTo(DBNull.Value));
 }
        public static QuirksMode GetQuirksMode(this DomDocument self)
        {
            var anno = self.Annotation <QuirksModeAnnotation>();

            if (anno != null)
            {
                return(anno.Value);
            }
            return(QuirksMode.None);
        }
        public void AddAnnotation_nominal()
        {
            DomDocument d = new DomDocument();

            d.AddAnnotation(AnnotationClass.Value);

            Assert.True(d.HasAnnotation <AnnotationClass>());
            Assert.NotEmpty(d.Annotations <AnnotationClass>());
            Assert.Empty(d.Annotations <Uri>());
            Assert.Equal(AnnotationClass.Value, d.Annotation <AnnotationClass>());
        }