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 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>()); }
public void AddAnnotations_should_add_all_nominal() { DomDocument d = new DomDocument(); d.AddAnnotations(new object [] { AnnotationClass.Value, Glob.Anything, string.Empty }); Assert.SetEqual(new object [] { AnnotationClass.Value, Glob.Anything, string.Empty }, d.Annotations()); }