public virtual void ListSetSymbol() { List list = new List(); NUnit.Framework.Assert.IsNull(list.GetProperty <Object>(Property.LIST_SYMBOL)); list.SetListSymbol("* "); NUnit.Framework.Assert.AreEqual("* ", ((Text)list.GetProperty <Object>(Property.LIST_SYMBOL)).GetText()); list = new List(); Style style = new Style(); style.SetProperty(Property.LIST_SYMBOL, new Text("* ")); list.AddStyle(style); NUnit.Framework.Assert.AreEqual("* ", ((Text)list.GetProperty <Object>(Property.LIST_SYMBOL)).GetText()); }
public virtual void KeepWithNextTest11() { String outFileName = destinationFolder + "keepWithNextTest11.pdf"; String cmpFileName = sourceFolder + "cmp_keepWithNextTest11.pdf"; PdfDocument pdf = new PdfDocument(new PdfWriter(outFileName)); Document document = new Document(pdf); Style style = new Style(); style.SetProperty(Property.KEEP_WITH_NEXT, true); document.Add(new Paragraph("A").AddStyle(style)); Table table = new Table(UnitValue.CreatePercentArray(1)).UseAllAvailableWidth().SetBorderTop(new SolidBorder (2)).SetBorderBottom(new SolidBorder(2)); table.AddCell("Body").AddHeaderCell("Header"); document.Add(table); document.Close(); NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder , "diff")); }