public virtual void FieldNullValueUnitTest() { XmlDocument document = XfdfFileUtils.CreateNewXfdfDocument(); XmlElement fields = document.CreateElement("fields"); document.AppendChild(fields); FieldObject fieldObject = new FieldObject(); fieldObject.SetName("testname"); IList <FieldObject> fieldList = new List <FieldObject>(); XfdfWriter.AddField(fieldObject, fields, document, fieldList); XmlNode childOfFields = fields.FirstChild; NUnit.Framework.Assert.IsNotNull(childOfFields); NUnit.Framework.Assert.IsNull(childOfFields.FirstChild); }
/// <exception cref="Javax.Xml.Transform.TransformerException"/> /// <exception cref="Javax.Xml.Parsers.ParserConfigurationException"/> public virtual void WriteToFile(Stream os) { XfdfWriter writer = new XfdfWriter(os); writer.Write(this); }