コード例 #1
0
        public void InsertTagContentToOpenCloseTag()
        {
            using (var initialDocument = new DocxDocument(Resources.WithMainContentTag))
                using (var expectedDocument = new DocxDocument(Resources.WithMainContentInserted))
                {
                    var content = new[] { new TextBlock("Контент документа") };
                    initialDocument.InsertTagContent("MAIN_CONTENT", content);

                    Assert.IsTrue(new DocxDocumentEqualityComparer().Equals(expectedDocument, initialDocument));
                }
        }