@@ -240,8 +240,8 @@ public void GenerateWordDocForEntry_OneSenseWithGlossGeneratesCorrectResult()
240240 //SUT
241241 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( entry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
242242 Console . WriteLine ( result ) ;
243- AssertThatXmlIn . String ( result . mainDocPart . RootElement . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
244- "/w:document/w: body/w:p/w:r/w:t[text()='gloss']" ,
243+ AssertThatXmlIn . String ( result . DocBody . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
244+ "/w:body/w:p/w:r/w:t[text()='gloss']" ,
245245 1 ,
246246 WordNamespaceManager ) ;
247247 }
@@ -275,8 +275,8 @@ public void GenerateWordDocForEntry_LineBreaksInBeforeContentWork()
275275 //SUT
276276 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( entry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
277277 Console . WriteLine ( result ) ;
278- AssertThatXmlIn . String ( result ? . mainDocPart . RootElement ? . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
279- "/w:document/w: body/w:p/w:r/w:br[@w:type='textWrapping']" ,
278+ AssertThatXmlIn . String ( result ? . DocBody ? . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
279+ "/w:body/w:p/w:r/w:br[@w:type='textWrapping']" ,
280280 2 ,
281281 WordNamespaceManager ) ;
282282 }
@@ -327,8 +327,8 @@ public void GenerateUniqueStyleName()
327327 //SUT
328328 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( entry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
329329
330- Assert . True ( result . mainDocPart . RootElement . OuterXml . Contains ( "Gloss[lang=en]" ) ) ;
331- Assert . True ( result . mainDocPart . RootElement . OuterXml . Contains ( "Gloss2[lang=en]" ) ) ;
330+ Assert . True ( result . DocBody . OuterXml . Contains ( "Gloss[lang=en]" ) ) ;
331+ Assert . True ( result . DocBody . OuterXml . Contains ( "Gloss2[lang=en]" ) ) ;
332332 }
333333
334334 [ Test ]
@@ -385,7 +385,7 @@ public void GenerateSenseNumberData()
385385 // 3. Sense number: 2
386386 // 4. Sense number after text: AFT
387387 const string senseNumberTwoRun = "<w:t xml:space=\" preserve\" >BEF</w:t></w:r><w:r><w:rPr><w:rStyle w:val=\" Sense Number[lang=en]\" /></w:rPr><w:t xml:space=\" preserve\" >2</w:t></w:r><w:r><w:rPr><w:rStyle w:val=\" Sense Number-Context[lang=en]\" /></w:rPr><w:t xml:space=\" preserve\" >AFT</w:t></w:r>" ;
388- Assert . True ( result . mainDocPart . RootElement . OuterXml . Contains ( senseNumberTwoRun ) ) ;
388+ Assert . True ( result . DocBody . OuterXml . Contains ( senseNumberTwoRun ) ) ;
389389 }
390390
391391 [ Test ]
@@ -438,7 +438,7 @@ public void GenerateBeforeBetweenAfterContent()
438438
439439 //SUT
440440 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( testEntry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
441- var outXml = result . mainDocPart . RootElement . OuterXml ;
441+ var outXml = result . DocBody . OuterXml ;
442442
443443 // Before text 'BE1' is before sense number '1' for 'gloss'.
444444 const string beforeFirstSense =
@@ -520,7 +520,7 @@ public void GenerateBeforeBetweenAfterContentWithWSAbbreviation()
520520
521521 //SUT
522522 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( testEntry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
523- var outXml = result . mainDocPart . RootElement . OuterXml ;
523+ var outXml = result . DocBody . OuterXml ;
524524
525525 // Before text 'BE3' is after the sense number '1' and before the english abbreviation, which is before 'gloss'.
526526 const string beforeAbbreviation =
@@ -576,7 +576,7 @@ public void GeneratePropertyData()
576576
577577 //SUT
578578 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( entry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
579- var outXml = result . mainDocPart . RootElement . OuterXml ;
579+ var outXml = result . DocBody . OuterXml ;
580580
581581 // The property before text 'BE4' is first, followed by the style that is applied to the property, 'DisplayNameBase'.
582582 const string beforeAndStyle = "<w:t xml:space=\" preserve\" >BE4</w:t></w:r><w:r><w:rPr><w:rStyle w:val=\" DisplayNameBase[lang=en]\" /></w:rPr>" ;
@@ -641,7 +641,7 @@ public void EmbeddedStylesHaveNoExtraSpace()
641641
642642 //SUT
643643 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( testEntry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
644- var outXml = result . mainDocPart . RootElement . OuterXml ;
644+ var outXml = result . DocBody . OuterXml ;
645645 // Verify that AREYOUCRAZY appears only once in the output.
646646 var betweenCount = Regex . Matches ( outXml , "AREYOUCRAZY" ) . Count ;
647647
@@ -688,8 +688,8 @@ public void ReferenceParagraphDisplayNames()
688688 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( testEntry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
689689
690690 // Assert that the references to the paragraph styles use the display names, not the style names.
691- Assert . True ( result . mainDocPart . RootElement . OuterXml . Contains ( MainEntryParagraphDisplayName ) ) ;
692- Assert . True ( result . mainDocPart . RootElement . OuterXml . Contains ( SensesParagraphDisplayName ) ) ;
691+ Assert . True ( result . DocBody . OuterXml . Contains ( MainEntryParagraphDisplayName ) ) ;
692+ Assert . True ( result . DocBody . OuterXml . Contains ( SensesParagraphDisplayName ) ) ;
693693 }
694694
695695 [ Test ]
@@ -751,8 +751,8 @@ public void GenerateParagraphForSensesAndSubSenses()
751751 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( testEntry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
752752
753753 // There should be 5 paragraphs, one for the main entry, one for each sense, and one for each subsense.
754- AssertThatXmlIn . String ( result . mainDocPart . RootElement . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
755- "/w:document/w: body/w:p" ,
754+ AssertThatXmlIn . String ( result . DocBody . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
755+ "/w:body/w:p" ,
756756 5 ,
757757 WordNamespaceManager ) ;
758758 }
@@ -815,7 +815,7 @@ public void GenerateBulletsAndNumbering()
815815 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( testEntry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
816816
817817 // There should be two instances of the bulletId and one instance for each of the numberId's.
818- string resultStr = result . mainDocPart . RootElement . OuterXml ;
818+ string resultStr = result . DocBody . OuterXml ;
819819 int count1 = Regex . Matches ( resultStr , "<w:numId w:val=\" 1\" />" ) . Count ;
820820 int count2 = Regex . Matches ( resultStr , "<w:numId w:val=\" 2\" />" ) . Count ;
821821 int count3 = Regex . Matches ( resultStr , "<w:numId w:val=\" 3\" />" ) . Count ;
@@ -888,13 +888,13 @@ public void GenerateContinueParagraph()
888888 var result = ConfiguredLcmGenerator . GenerateContentForEntry ( testEntry , mainEntryNode , null , DefaultSettings , 0 ) as DocFragment ;
889889
890890 // There should be 3 paragraph styles, one for the main entry, one for the sense, and one for the continuation of the main entry.
891- AssertThatXmlIn . String ( result . mainDocPart . RootElement . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
892- "/w:document/w: body/w:p/w:pPr/w:pStyle" ,
891+ AssertThatXmlIn . String ( result . DocBody . OuterXml ) . HasSpecifiedNumberOfMatchesForXpath (
892+ "/w:body/w:p/w:pPr/w:pStyle" ,
893893 3 ,
894894 WordNamespaceManager ) ;
895895
896896 // Assert that the continuation paragraph uses the continuation style.
897- Assert . True ( result . mainDocPart . RootElement . OuterXml . Contains ( MainEntryParagraphDisplayName + WordStylesGenerator . EntryStyleContinue ) ) ;
897+ Assert . True ( result . DocBody . OuterXml . Contains ( MainEntryParagraphDisplayName + WordStylesGenerator . EntryStyleContinue ) ) ;
898898 }
899899
900900 [ Test ]
0 commit comments