void () { final JpsModule dep = addModule("dep"); final String depSrcRoot = addSourceRoot(dep, false); final String depTestRoot = addSourceRoot(dep, true); final String depOutput = setModuleOutput(dep, false); final String depTestOutput = setModuleOutput(dep, true); JpsModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), JpsJavaDependencyScope.COMPILE, true); JpsModuleRootModificationUtil.addDependency(myModule, dep, JpsJavaDependencyScope.COMPILE, true); final String srcRoot = addSourceRoot(myModule, false); final String testRoot = addSourceRoot(myModule, true); final String output = setModuleOutput(myModule, false); final String testOutput = setModuleOutput(myModule, true); assertClassRoots(dependencies(myModule).withoutSdk(), testOutput, output, depTestOutput, depOutput); assertClassRoots(dependencies(myModule).withoutSdk().recursively(), testOutput, output, depTestOutput, depOutput, getFastUtilJar()); assertSourceRoots(dependencies(myModule), srcRoot, testRoot, depSrcRoot, depTestRoot); assertSourceRoots(dependencies(myModule).recursively(), srcRoot, testRoot, depSrcRoot, depTestRoot, getFastUtilSources()); assertClassRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively(), getFastUtilJar()); assertSourceRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively(), getFastUtilSources()); assertEnumeratorRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively().classes(), getFastUtilJar()); assertEnumeratorRoots(dependencies(myModule).withoutSdk().withoutModuleSourceEntries().recursively().sources(), getFastUtilSources()); assertEnumeratorRoots(dependencies(myModule).withoutSdk().recursively().classes().withoutSelfModuleOutput(), output, depTestOutput, depOutput, getFastUtilJar()); assertEnumeratorRoots(dependencies(myModule).productionOnly().withoutSdk().recursively().classes().withoutSelfModuleOutput(), depOutput, getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().withoutDepModules().withoutModuleSourceEntries().recursively(), getFastUtilJar()); assertEnumeratorRoots( dependencies(myModule).productionOnly().withoutSdk().withoutDepModules().withoutModuleSourceEntries().recursively().classes(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().withoutDepModules().withoutModuleSourceEntries()); assertEnumeratorRoots(dependencies(myModule).productionOnly().withoutModuleSourceEntries().withoutSdk().withoutDepModules().classes()); }