@Test public void getTreeOfModuleWithOneSubmodule(){ repoHandler.loadTestCase(new TC03_ModuleWithOneSubmoduleAndDependencyOfEachType()); final String moduleId = DbModule.generateID(TC03_ModuleWithOneSubmoduleAndDependencyOfEachType.MODULE_NAME, TC03_ModuleWithOneSubmoduleAndDependencyOfEachType.MODULE_VERSION); TreeNode tree = graphHandler.getModuleTree(moduleId); assertNotNull(tree); assertEquals(1, tree.getChildren().size()); TreeNode subModule = tree.getChildren().get(0); assertEquals(TC03_ModuleWithOneSubmoduleAndDependencyOfEachType.SUBMODULE_NAME, subModule.getName()); assertEquals(0, subModule.getChildren().size()); }
public TreeNode getModuleTree(final String moduleId) { final ModuleHandler moduleHandler = new ModuleHandler(repoHandler); final DbModule module = moduleHandler.getModule(moduleId); final TreeNode tree = new TreeNode(); tree.setName(module.getName()); for (final DbModule submodule : module.getSubmodules()) { addModuleToTree(submodule, tree); } return tree; }
GraphsHandler { public TreeNode getModuleTree(final String moduleId) { final ModuleHandler moduleHandler = new ModuleHandler(repoHandler); final DbModule module = moduleHandler.getModule(moduleId); final TreeNode tree = new TreeNode(); tree.setName(module.getName()); for (final DbModule submodule : module.getSubmodules()) { addModuleToTree(submodule, tree); } return tree; } }
GraphsHandler { public TreeNode getModuleTree(final String moduleId) { final ModuleHandler moduleHandler = new ModuleHandler(repoHandler); final DbModule module = moduleHandler.getModule(moduleId); final TreeNode tree = new TreeNode(); tree.setName(module.getName()); for (final DbModule submodule : module.getSubmodules()) { addModuleToTree(submodule, tree); } return tree; } GraphsHandler(final RepositoryHandler repoHandler, final FiltersHolder filters); }
GraphsHandler { public TreeNode getModuleTree(final String moduleId) { final ModuleHandler moduleHandler = new ModuleHandler(repoHandler); final DbModule module = moduleHandler.getModule(moduleId); final TreeNode tree = new TreeNode(); tree.setName(module.getName()); for (final DbModule submodule : module.getSubmodules()) { addModuleToTree(submodule, tree); } return tree; } GraphsHandler(final RepositoryHandler repoHandler, final FiltersHolder filters); AbstractGraph getModuleGraph(final String moduleId); TreeNode getModuleTree(final String moduleId); }
GraphsHandler { public TreeNode getModuleTree(final String moduleId) { final ModuleHandler moduleHandler = new ModuleHandler(repoHandler); final DbModule module = moduleHandler.getModule(moduleId); final TreeNode tree = new TreeNode(); tree.setName(module.getName()); for (final DbModule submodule : module.getSubmodules()) { addModuleToTree(submodule, tree); } return tree; } GraphsHandler(final RepositoryHandler repoHandler, final FiltersHolder filters); AbstractGraph getModuleGraph(final String moduleId); TreeNode getModuleTree(final String moduleId);  }