Package br.com.caelum.tubaina.builder

Examples of br.com.caelum.tubaina.builder.ChapterBuilder


        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


        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

import freemarker.template.Configuration;

public class SingleHtmlChapterGeneratorTest {
   
    private Chapter createChapter(final String introduction, final String chapterText) {
        return new ChapterBuilder("Title", introduction, chapterText, 0, new SectionsManager()).build();
    }
View Full Code Here

    Parser parser = new HtmlParser(new RegexConfigurator().read("/regex.properties", "/kindle.properties"));
    chapterToString = new ChapterToKindle(parser, cfg);
  }

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

TOP

Related Classes of br.com.caelum.tubaina.builder.ChapterBuilder

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.