Package br.com.caelum.tubaina

Examples of br.com.caelum.tubaina.SectionsManager


        .getClass());
    Assert.assertEquals(ParagraphChunk.class, chunks.get(10).getClass());
  }

  private ChunksMakerBuilder chunksMakerBuilder() {
    return new ChunksMakerBuilder(resources, new SectionsManager());
  }
View Full Code Here


    result.contains("<strong>");
    result.contains("href=\"http://google.com/\"");
  }
 
  private ImageChunk makeChunk(String path, String options, int width) {
    return new ImageChunk(path, options, width, 1, new SectionsManager());
  }
View Full Code Here

    }
    return containsText;
  }
 
    private BookBuilder builder(String title) {
      return new BookBuilder(title, new SectionsManager());
    }
View Full Code Here

  @Before
  public void setUp() {
    ResourceLocator.initialize(".");
    module = new MockedModule();
    builder = new BookBuilder("livro", new SectionsManager());
  }
View Full Code Here

  private List<Resource> resources;

  @Before
  public void setUp() {
    resources = new ArrayList<Resource>();
    replacer = new ImageReplacer(new SectionsManager(), resources);
    chunks = new ArrayList<Chunk>();
    ResourceLocator.initialize(new File("."));
  }
View Full Code Here

        partToKindle = new PartToKindle(parser, cfg, new ArrayList<String>());
    }

    private Chapter createChapter(String title, String introduction, String content) {
        return new ChapterBuilder(title, introduction, content, 1, new SectionsManager()).build();
    }
View Full Code Here

    @Test
    public void testGeneratePartWithChapters() {
        Chapter chapter = createChapter("chapter title", "introduction",
                "[section section one] section content");
        List<BookPart> bookParts = new BookPartsBuilder(new SectionsManager()).addPartFrom("[part \"parte 1\"]")
                .addChaptersToLastAddedPart(Arrays.asList(chapter)).build();
        BookPart part = bookParts.get(0);
        new KindleModule().inject(part);
       
    String generatedContent = partToKindle.generateKindlePart(part,
View Full Code Here

    @Test
    public void testGenerateANotPrintablePartWithChapters() {
        Chapter chapter = createChapter("chapter title", "introduction",
                "[section section one] section content");
        List<BookPart> bookParts = new BookPartsBuilder(new SectionsManager()).addChaptersToLastAddedPart(
                Arrays.asList(chapter)).build();
        BookPart part = bookParts.get(0);
        new KindleModule().inject(part);
    String generatedContent = partToKindle.generateKindlePart(part,
                new TubainaHtmlDir(null, null, new KindleResourceManipulatorFactory()), 1).toString();
View Full Code Here

    assertTrue(output.contains("\\url"));
    assertTrue(output.contains("\\definition"));
  }
 
  private ImageChunk makeChunk(String path, String options) {
    ImageChunk chunk = new ImageChunk(path, options, 100, 1, new SectionsManager());
    return chunk;
  }
View Full Code Here

        introductionChaptersToKindle = new IntroductionChaptersToKindle(parser, cfg, bookRoot);
    }

    @Test
    public void shouldGenerateIntroductionChapters() throws Exception {
        Chapter preface = new ChapterBuilder("preface", "label""preface text", "", 0, true, new SectionsManager()).build();
        new KindleModule().inject(preface);
        String introductionChapters = introductionChaptersToKindle.generateIntroductionChapters(
                Arrays.asList(preface)).toString();
        assertTrue(introductionChapters.contains("<h2>preface</h2>"));
        assertTrue(introductionChapters.contains("preface text"));
View Full Code Here

TOP

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

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.