Package br.com.caelum.tubaina.chunk

Examples of br.com.caelum.tubaina.chunk.SubsectionChunk


public class SubsectionTagTest extends AbstractTagTest {

  @Test
  public void shouldParseSubsectionChunk() {
    SubsectionTag subsectionTag = new SubsectionTag();
    SubsectionChunk chunk = new SubsectionChunk("title", text("content"), 1, 1, 1);
    String parsed = subsectionTag.parse(chunk);
    assertEquals("<"+SubsectionTag.HTML_TAG+" class='subsection'>1.1.1 - title</"+SubsectionTag.HTML_TAG+">\ncontent", parsed);
  }
View Full Code Here


  }
 
  @Test
  public void shouldParseSubsectionChunkSanitized() {
    SubsectionTag subsectionTag = new SubsectionTag();
    SubsectionChunk chunk = new SubsectionChunk("éáçãà", text("content"), 1, 1, 1);
    String parsed = subsectionTag.parse(chunk);
    assertEquals("<"+SubsectionTag.HTML_TAG+" class='subsection'>1.1.1 - &eacute;&aacute;&ccedil;&atilde;&agrave;</"+SubsectionTag.HTML_TAG+">\ncontent", parsed);
  }
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

  protected Chunk createChunk(String options, String content) {
    int subsectionNumber = sectionsManager.nextSubsection();
    int currentChapter = sectionsManager.getCurrentChapter();
    int currentSection = sectionsManager.getCurrentSection();
    List<Chunk> body = new ChunkSplitter(resources, "subsection", sectionsManager).splitChunks(content);
    return new SubsectionChunk(options, body, subsectionNumber, currentChapter, currentSection);
  }
View Full Code Here

public class SubsectionTagTest extends AbstractTagTest{
 
  @Test
  public void shouldParseSubsectionChunk() {
    SubsectionTag subsectionTag = new SubsectionTag(new SectionsManager());
    SubsectionChunk chunk = new SubsectionChunk("title", text("content"), 1, 1, 1);
    String parsed = subsectionTag.parse(chunk);
    assertEquals("<"+SubsectionTag.HTML_TAG+" class='subsection'>1.1.1 - title</"+SubsectionTag.HTML_TAG+">\ncontent", parsed);
  }
View Full Code Here

  }
 
  @Test
  public void shouldParseSubsectionChunkSanitized() {
    SubsectionTag subsectionTag = new SubsectionTag(new SectionsManager());
    SubsectionChunk chunk = new SubsectionChunk("éáçãà", text("content"), 1, 1, 1);
    String parsed = subsectionTag.parse(chunk);
    assertEquals("<"+SubsectionTag.HTML_TAG+" class='subsection'>1.1.1 - &eacute;&aacute;&ccedil;&atilde;&agrave;</"+SubsectionTag.HTML_TAG+">\ncontent", parsed);
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.tubaina.chunk.SubsectionChunk

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.