public void UnlinkAllFieldsInRange() { Document doc = new Document(MyDir + "UnlinkFields.docx"); Section newSection = (Section)doc.Sections[0].Clone(true); doc.Sections.Add(newSection); doc.Sections[1].Range.UnlinkFields(); string secWithFields = DocumentHelper.GetSectionText(doc, 1); Assert.AreEqual(secWithFields, "Fields.Docx Элементы указателя не найдены. 3.\rОшибка! Не указана последовательность. Fields.Docx Элементы указателя не найдены. 4.\r\r\r\r\r\f"); }
public void UnlinkAllFieldsInRange() { //ExStart //ExFor:Range.UnlinkFields //ExSummary:Shows how to unlink all fields in range Document doc = new Document(MyDir + "Field.UnlinkFields.docx"); Section newSection = (Section)doc.Sections[0].Clone(true); doc.Sections.Add(newSection); doc.Sections[1].Range.UnlinkFields(); //ExEnd String secWithFields = DocumentHelper.GetSectionText(doc, 1); Assert.AreEqual(secWithFields, "Fields.Docx Элементы указателя не найдены. 3.\rОшибка! Не указана последовательность. Fields.Docx Элементы указателя не найдены. 4.\r\r\r\r\r\f"); }