public void init() { li.SetCssAppliers(new CssAppliersImpl()); workerContextImpl = new WorkerContextImpl(); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null)); currentContent.AddRange(li.Content(workerContextImpl, new Tag("li"), "list item")); }
virtual public void SetUp() { workerContextImpl = new WorkerContextImpl(); p.SetCssAppliers(new CssAppliersImpl()); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null)); currentContent.AddRange(p.Content(workerContextImpl, new Tag("p"), "some paragraph text")); }
virtual public void init() { h.SetCssAppliers(new CssAppliersImpl()); workerContextImpl = new WorkerContextImpl(); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null).AutoBookmark(true)); content = h.Content(workerContextImpl, H2, "text inside a header tag"); }
virtual public void init() { workerContextImpl = new WorkerContextImpl(); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null)); t.SetCssAppliers(new CssAppliersImpl()); content = t.Content(workerContextImpl, new Tag("pre"), " code snippet {" + "return it all!!} "); }
virtual public void SetUp() { workerContextImpl = new WorkerContextImpl(); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null)); s.SetCssAppliers(new CssAppliersImpl()); content = s.Content(workerContextImpl, new Tag("span"), " text snippet "+ "return it sanitized!! "); }
virtual public void SetUp() { workerContextImpl = new WorkerContextImpl(); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null)); currentContent.Add(new Paragraph("titel paragraph")); currentContent.Add(Chunk.NEWLINE); currentContent.Add(new NoNewLineParagraph("first content text")); currentContent.Add(new Paragraph("footer text")); d.SetCssAppliers(new CssAppliersImpl()); }
public void VerifyBreakChunk() { Break br = new Break(); WorkerContextImpl workerContextImpl = new WorkerContextImpl(); CssAppliersImpl cssAppliers = new CssAppliersImpl(); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(cssAppliers)); br.SetCssAppliers(cssAppliers); IList <IElement> end = br.End(workerContextImpl, new Tag("span"), null); Assert.AreEqual(Chunk.NEWLINE.Content, end[0].Chunks[0].Content); }
virtual public void ResolveBuild() { AbstractTagProcessor table2 = new Table(); table2.SetCssAppliers(new CssAppliersImpl()); WorkerContextImpl context = new WorkerContextImpl(); context.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null)); PdfPTable table = (PdfPTable)(table2.End(context, tag, rows)[0]); Assert.AreEqual(4, table.Rows[0].GetCells().Length); Assert.AreEqual(4, table.NumberOfColumns); }
virtual public void TestContentToChunk() { Anchor a = new Anchor(); Tag t = new Tag("dummy"); String content2 = "some content"; WorkerContextImpl ctx = new WorkerContextImpl(); HtmlPipelineContext htmlPipelineContext = new HtmlPipelineContext(null); ctx.Put(typeof(HtmlPipeline).FullName, htmlPipelineContext); a.SetCssAppliers(new CssAppliersImpl()); IList <IElement> ct = a.Content(ctx, t, content2); Assert.AreEqual(content2, ct[0].Chunks[0].Content); }
virtual public void SetUp() { LoggerFactory.GetInstance().SetLogger(new SysoLogger(3)); root = new Tag("body"); p = new Tag("p"); ul = new Tag("ul"); first = new Tag("li"); last = new Tag("li"); single = new ListItem("Single"); start = new ListItem("Start"); end = new ListItem("End"); listWithOne = new List <IElement>(); listWithTwo = new List <IElement>(); orderedUnorderedList = new OrderedUnorderedList(); CssAppliersImpl cssAppliers = new CssAppliersImpl(); orderedUnorderedList.SetCssAppliers(cssAppliers); workerContextImpl = new WorkerContextImpl(); HtmlPipelineContext context2 = new HtmlPipelineContext(cssAppliers); workerContextImpl.Put(typeof(HtmlPipeline).FullName, context2); root.AddChild(p); root.AddChild(ul); ul.AddChild(first); ul.AddChild(last); p.CSS["font-size"] = "12pt"; p.CSS["margin-top"] = "12pt"; p.CSS["margin-bottom"] = "12pt"; new ParagraphCssApplier(cssAppliers).Apply(new Paragraph("paragraph"), p, context2); first.CSS["margin-top"] = "50pt"; first.CSS["padding-top"] = "25pt"; first.CSS["margin-bottom"] = "50pt"; first.CSS["padding-bottom"] = "25pt"; last.CSS["margin-bottom"] = "50pt"; last.CSS["padding-bottom"] = "25pt"; listWithOne.Add(single); listWithTwo.Add(start); listWithTwo.Add(end); }
virtual public void Init() { b.SetCssAppliers(new CssAppliersImpl()); workerContextImpl = new WorkerContextImpl(); workerContextImpl.Put(typeof(HtmlPipeline).FullName, new HtmlPipelineContext(null)); }