Dump2HTMLCreator { public void dump(DumpMode mode, File dbDirectory, File htmlDirectory, @Nullable File imageDirectory) throws IOException { try (WikiDB db = new WikiDB(dbDirectory)) { if (mode == BOTH || mode == WRITE_TEMPLATES_AND_MODULES) { firstPass(db); } if (mode == BOTH || mode == WRITE_HTML) { secondPass(db, htmlDirectory, imageDirectory); } } catch (SQLException | SAXException e) { throw new IOException(e); } } Dump2HTMLCreator(File dumpFile); static void main(String[] args); void dump(DumpMode mode, File dbDirectory, File htmlDirectory, @Nullable File imageDirectory);  }
@Test public void importTemplatesAndModules() throws Exception { creator.dump(Dump2HTMLCreator.DumpMode.WRITE_TEMPLATES_AND_MODULES, dbDir, htmlDir, null); assertThat(dbDir).isDirectory(); assertThat(htmlDir).doesNotExist(); }
@Test public void importAndRenderHTML() throws Exception { creator.dump(Dump2HTMLCreator.DumpMode.BOTH, dbDir, htmlDir, null); assertThat(dbDir).isDirectory(); assertThat(htmlDir).isDirectory(); assertThat(htmlDir.listFiles()).hasSize(3); }