public void TestSetGetVerticalAlignment() { //new clean instance of paragraph XWPFDocument doc = new XWPFDocument(); XWPFParagraph p = doc.CreateParagraph(); CT_P ctp = p.GetCTP(); CT_PPr ppr = ctp.pPr == null?ctp.AddNewPPr() : ctp.pPr; CT_TextAlignment txtAlign = ppr.AddNewTextAlignment(); txtAlign.val = (ST_TextAlignment.center); Assert.AreEqual(TextAlignment.CENTER, p.GetVerticalAlignment()); p.SetVerticalAlignment(TextAlignment.BOTTOM); Assert.AreEqual(ST_TextAlignment.bottom, ppr.textAlignment.val); }