public void Bug55802() { String blabla = "Bir, iki, \u00fc\u00e7, d\u00f6rt, be\u015f,\n" + "\nalt\u0131, yedi, sekiz, dokuz, on.\n" + "\nK\u0131rm\u0131z\u0131 don,\n" + "\ngel bizim bah\u00e7eye kon,\n" + "\nsar\u0131 limon"; XWPFDocument doc = new XWPFDocument(); XWPFRun run = doc.CreateParagraph().CreateRun(); foreach (String str in blabla.Split("\n".ToCharArray())) { run.SetText(str); run.AddBreak(); } run.FontFamily = (/*setter*/ "Times New Roman"); run.FontSize = (/*setter*/ 20); Assert.AreEqual(run.FontFamily, "Times New Roman"); Assert.AreEqual(run.GetFontFamily(FontCharRange.CS), "Times New Roman"); Assert.AreEqual(run.GetFontFamily(FontCharRange.EastAsia), "Times New Roman"); Assert.AreEqual(run.GetFontFamily(FontCharRange.HAnsi), "Times New Roman"); run.SetFontFamily("Arial", FontCharRange.HAnsi); Assert.AreEqual(run.GetFontFamily(FontCharRange.HAnsi), "Arial"); }
public void TestAddPageBreak() { ctRun.AddNewT().Value = ("TEST STRING"); ctRun.AddNewBr(); ctRun.AddNewT().Value = ("TEST2 STRING"); CT_Br breac = ctRun.AddNewBr(); breac.clear = (ST_BrClear.left); ctRun.AddNewT().Value = ("TEST3 STRING"); Assert.AreEqual(2, ctRun.SizeOfBrArray()); XWPFRun run = new XWPFRun(new CT_R(), p); run.SetText("TEXT1"); run.AddBreak(); run.SetText("TEXT2"); run.AddBreak(BreakType.TEXTWRAPPING); Assert.AreEqual(2, run.GetCTR().SizeOfBrArray()); }