void (boolean inheritOutputPath) { List<Module> modules = new ArrayList<>(); for (int i = 0; i < 15; i++) { VirtualFile file = createFile("m" + i + "/src/A" + i + ".java", "public class A" + i + "{}"); final String moduleName = "m" + i; VirtualFile sourceRoot = file.getParent(); Module module; if (inheritOutputPath) { module = addModule(moduleName, sourceRoot); } else { module = createModule(moduleName); VirtualFile contentRoot = sourceRoot.getParent(); PsiTestUtil.addContentRoot(module, contentRoot); PsiTestUtil.addSourceRoot(module, sourceRoot); ModuleRootModificationUtil.setModuleSdk(module, getTestProjectJdk()); PsiTestUtil.setCompilerOutputPath(module, contentRoot.getUrl() + "/classes", false); } modules.add(module); } Module[] modulesArray = modules.toArray(Module.EMPTY_ARRAY); subscribeToRootChanges(); make(modulesArray); assertOutputDirectoriesRefreshed(modulesArray); }