MuleArtifactContentResolver { public List<String> getExportedPackages() throws IOException { if (exportedPackages == null) { exportedPackages = getResources(projectStructure.getExportedPackagesPath()); } return exportedPackages; } MuleArtifactContentResolver(ProjectStructure projectStructure, Pom pom, List<BundleDependency> bundleDependencies); ProjectStructure getProjectStructure(); List<String> getExportedPackages(); List<String> getExportedResources(); List<String> getTestExportedResources(); List<String> getConfigs(); List<String> getTestConfigs(); static String escapeSlashes(String p); List<BundleDependency> getBundleDependencies(); Pom getPom(); static final String CLASS_PATH_SEPARATOR; }
@Test public void getExportedPackagesTest() throws IOException { File jar1 = new File(javaFolder, JAR_1); File jar2 = new File(javaFolder, JAR_2); File jar3Folder = new File(javaFolder, JAR_3_LOCATION); File jar3 = new File(jar3Folder, JAR_3); jar1.createNewFile(); jar2.createNewFile(); jar3Folder.mkdirs(); jar3.createNewFile(); List<String> actualExportedPackages = resolver.getExportedPackages(); assertThat("Exported packages does not contain all expected elements", actualExportedPackages, containsInAnyOrder(JAR_1, JAR_2, JAR_3_LOCATION + separator + JAR_3)); assertThat("Exported packages contains more elements than expected", actualExportedPackages.size(), equalTo(3)); }