@Test public void testTocNumberOfPages() { MergeParameters params = new MergeParameters(); params.setTableOfContentsPolicy(ToCPolicy.DOC_TITLES); params.addInput(new PdfMergeInput(mock(PdfFileSource.class))); TableOfContentsCreator victim = new TableOfContentsCreator(params, new PDDocument()); assertEquals(1, victim.tocNumberOfPages()); }
public long tocNumberOfPages() { return tocNumberOfPages; }
TableOfContentsCreator { public long tocNumberOfPages() { return tocNumberOfPages; } }
TableOfContentsCreator { public long tocNumberOfPages() { return tocNumberOfPages; } TableOfContentsCreator(MergeParameters params, PDDocument document); }
TableOfContentsCreator { public long tocNumberOfPages() { return tocNumberOfPages; } TableOfContentsCreator(MergeParameters params, PDDocument document); void appendItem(String text, long pageNumber, PDPage page); void addToC(); void addToC(int beforePageNumber); boolean hasToc(); boolean shouldGenerateToC(); void pageSizeIfNotSet(PDRectangle pageSize); float getFontSize(); long tocNumberOfPages(); }
TableOfContentsCreator { public long tocNumberOfPages() { return tocNumberOfPages; } TableOfContentsCreator(MergeParameters params, PDDocument document); void appendItem(String text, long pageNumber, PDPage page); void addToC(); void addToC(int beforePageNumber); boolean hasToc(); boolean shouldGenerateToC(); void pageSizeIfNotSet(PDRectangle pageSize); float getFontSize(); long tocNumberOfPages();  }