DocSetSupport { public static void copyFiles(final String sourceDir, String docsetDir) throws BuilderException { copyFiles(getFile(sourceDir), docsetDir); } private  DocSetSupport(); static void createDocSetStructure(String docsetDir); static void copyIconFile(File iconFile, String docsetDir); static void copyFiles(final String sourceDir, String docsetDir); static void copyFiles(final File sourceDir, String docsetDir); static void createPList(String bundleIdentifier, String displayName, String keyword, String indexFile, String docsetDir); static String getDBDir(String docsetDir);  }
@Test public void testCopyFiles() throws Exception { final String docsetDir = createAndVerifyDocsetStructure("TestDoc"); final File destDir = getFile(getDocsetRoot(docsetDir), CONTENTS, RESOURCES, DOCUMENTS); copyFiles(javadocLocation, docsetDir); final Collection<String> originalFiles = buildFileCollectionWithoutPath(javadocLocation); final Collection<String> copiedFiles = buildFileCollectionWithoutPath(destDir); assertEquals(originalFiles, copiedFiles); }
@Test(expected = BuilderException.class) public void testCopyFilesError() throws Exception { final File sourceDir = getFile("src", "test", "resources", "javadoc", "index.html"); final String fakeRoot = FilenameUtils.concat(temporaryFolder.getRoot().getPath(), "Foo"); copyFiles(sourceDir, fakeRoot); }