Package br.com.caelum.tubaina

Examples of br.com.caelum.tubaina.AfcFile


  @Test
  public void shouldCopyImagesFromIntroduction() throws IOException {
    BookBuilder builder = builder("With images in intro");
    List<AfcFile> chapterReaders = new ArrayList<AfcFile>();
    String imagePath = "introImage.jpg";
    List<AfcFile> introductionReaders = Arrays.asList(new AfcFile(new StringReader("[chapter intro]\n[img "
        + imagePath + "]"), "file from string"));
    builder.addAllReaders(chapterReaders, introductionReaders);
    Book b = builder.build();
    new LatexModule().inject(b);
View Full Code Here


        this.readers.addAll(chapterReaders);
        this.introductionReaders.addAll(introductionReaders);
    }
   
    public void addReaderFromString(String fileContent) {
        addAllReaders(Arrays.asList(new AfcFile(new StringReader(fileContent), "file from string")),
                new ArrayList<AfcFile>());
    }
View Full Code Here

        }
    }
   
    public void addAllReadersOfNonNumberedFromStrings(List<String> introductionChapters) {
        for (String content : introductionChapters) {    
            this.introductionReaders.add(new AfcFile(new StringReader(content), "intro chapter from string"));
        }
    }
View Full Code Here

    @Test
    public void shouldCopyImagesFromIntroduction() throws IOException {
        BookBuilder builder = builder("With images in intro");
        List<AfcFile> chapterReaders = new ArrayList<AfcFile>();
        String imageName = "introImage.jpg";
        List<AfcFile> introductionReaders = Arrays.asList(new AfcFile(new StringReader("[chapter intro]\n[img " + imageName + "]"), "file from string"));
        builder.addAllReaders(chapterReaders, introductionReaders);
        Book book = builder.build();
        new KindleModule().inject(book);
        generator.generate(book, tempDir);
        File introDir = new File(tempDir, IntroductionChaptersToKindle.RESOURCES_PATH);
View Full Code Here

TOP

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

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.