@Test public void convertAndBuildConfluencePages_withPageTitlePostProcessor_convertsTemplatesAndReturnsMetadata() throws Exception { Path documentationRootFolder = Paths.get(DOCUMENTATION_LOCATION).toAbsolutePath(); Path buildFolder = this.temporaryFolder.newFolder().toPath().toAbsolutePath(); AsciidocPagesStructureProvider asciidocPagesStructureProvider = new FolderBasedAsciidocPagesStructureProvider(documentationRootFolder, UTF_8); PageTitlePostProcessor pageTitlePostProcessor = new PrefixAndSuffixPageTitlePostProcessor("(Doc) ", " (1.0)"); AsciidocConfluenceConverter asciidocConfluenceConverter = new AsciidocConfluenceConverter("~personalSpace", "1234"); ConfluencePublisherMetadata confluencePublisherMetadata = asciidocConfluenceConverter.convert(asciidocPagesStructureProvider, pageTitlePostProcessor, buildFolder, emptyMap()); assertThat(confluencePublisherMetadata.getSpaceKey(), is("~personalSpace")); assertThat(confluencePublisherMetadata.getAncestorId(), is("1234")); assertThat(confluencePublisherMetadata.getPages().size(), is(1)); ConfluencePageMetadata indexPageMetadata = confluencePublisherMetadata.getPages().get(0); assertThat(indexPageMetadata.getTitle(), is("(Doc) Test Document (1.0)")); }
public ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, Path buildFolder, Map<String, Object> userAttributes) { return convert(asciidocPagesStructureProvider, new NoOpPageTitlePostProcessor(), buildFolder, userAttributes); }
AsciidocConfluenceConverter { public ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, Path buildFolder, Map<String, Object> userAttributes) { return convert(asciidocPagesStructureProvider, new NoOpPageTitlePostProcessor(), buildFolder, userAttributes); } }
AsciidocConfluenceConverter { public ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, Path buildFolder, Map<String, Object> userAttributes) { return convert(asciidocPagesStructureProvider, new NoOpPageTitlePostProcessor(), buildFolder, userAttributes); } AsciidocConfluenceConverter(String spaceKey, String ancestorId); }
AsciidocConfluenceConverter { public ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, Path buildFolder, Map<String, Object> userAttributes) { return convert(asciidocPagesStructureProvider, new NoOpPageTitlePostProcessor(), buildFolder, userAttributes); } AsciidocConfluenceConverter(String spaceKey, String ancestorId); ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, Path buildFolder, Map<String, Object> userAttributes); ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, PageTitlePostProcessor pageTitlePostProcessor, Path buildFolder, Map<String, Object> userAttributes); }
AsciidocConfluenceConverter { public ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, Path buildFolder, Map<String, Object> userAttributes) { return convert(asciidocPagesStructureProvider, new NoOpPageTitlePostProcessor(), buildFolder, userAttributes); } AsciidocConfluenceConverter(String spaceKey, String ancestorId); ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, Path buildFolder, Map<String, Object> userAttributes); ConfluencePublisherMetadata convert(AsciidocPagesStructureProvider asciidocPagesStructureProvider, PageTitlePostProcessor pageTitlePostProcessor, Path buildFolder, Map<String, Object> userAttributes);  }