Package br.com.caelum.tubaina

Examples of br.com.caelum.tubaina.Chunk


        + "\n\n[center]Algum texto centralizado\n\nCom várias linhas[/center]\n\n");

    List<Chunk> chunks = chapters.get(0).getSections().get(0).getChunks();
    Assert.assertEquals(1, chunks.size());

    Chunk chunk = chunks.get(0);
    Assert.assertEquals(CenteredParagraphChunk.class, chunk.getClass());
    CenteredParagraphChunk castChunk = (CenteredParagraphChunk) chunk;
    Assert.assertEquals("Algum texto centralizado\n\nCom várias linhas", castChunk.getContent());
  }
View Full Code Here


      inject(introductionChapter);
    }
  }
 
  private void inject(BookPart part, Injector injector) {
    Chunk introductionChunk = (Chunk) new Mirror().on(part).get().field("introductionChunk");
    if (introductionChunk != null)
      inject(injector, introductionChunk);
    List<Chapter> chapters = part.getChapters();
    for (Chapter chapter : chapters) {
      inject(chapter);
View Full Code Here

public class SubsectionTagTest extends AbstractTagTest {

  @Test
  public void shouldParseSubsection() {
    Chunk chunk = new SubsectionChunk("title", text("content"), 1, 1, 1);
    String content = getContent(chunk);
    assertEquals("\\subsection{title}\ncontent", content);
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.tubaina.Chunk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.