@Test public void testNotExistingInput() { try { reader.readPom(ROOT_NOT_EXISTING_INPUT); fail("IllegalArgumentException expected"); } catch(IllegalArgumentException e) { assertThat(e).hasMessageStartingWith("java.io.FileNotFoundException:"); } }
public Node readPom(String dirname) { LOGGER.debug("Read pom file in directory: {}", dirname); FileSystemUtil.assertFileOrResourceExists(dirname); MavenProject bean = readFile(dirname); Node node = mapInput(bean); node.setProperty(Constants.SCOPE, "input"); bean.getModules().forEach(module -> { Node child = readPom(dirname + "/" + module); dependencyGraph.addDependency(node, child, DependencyType.CONTAINS); }
MavenInputReader { public Node readPom(String dirname) { LOGGER.debug("Read pom file in directory: {}", dirname); FileSystemUtil.assertFileOrResourceExists(dirname); MavenProject bean = readFile(dirname); Node node = mapInput(bean); node.setProperty(Constants.SCOPE, "input"); bean.getModules().forEach(module -> { Node child = readPom(dirname + "/" + module); dependencyGraph.addDependency(node, child, DependencyType.CONTAINS); } }
MavenInputReader { public Node readPom(String dirname) { LOGGER.debug("Read pom file in directory: {}", dirname); FileSystemUtil.assertFileOrResourceExists(dirname); MavenProject bean = readFile(dirname); Node node = mapInput(bean); node.setProperty(Constants.SCOPE, "input"); bean.getModules().forEach(module -> { Node child = readPom(dirname + "/" + module); dependencyGraph.addDependency(node, child, DependencyType.CONTAINS); } MavenInputReader(DependencyGraph dependencyGraph); }
MavenInputReader { public Node readPom(String dirname) { LOGGER.debug("Read pom file in directory: {}", dirname); FileSystemUtil.assertFileOrResourceExists(dirname); MavenProject bean = readFile(dirname); Node node = mapInput(bean); node.setProperty(Constants.SCOPE, "input"); bean.getModules().forEach(module -> { Node child = readPom(dirname + "/" + module); dependencyGraph.addDependency(node, child, DependencyType.CONTAINS); } MavenInputReader(DependencyGraph dependencyGraph); Node readPom(String dirname); }
MavenInputReader { public Node readPom(String dirname) { LOGGER.debug("Read pom file in directory: {}", dirname); FileSystemUtil.assertFileOrResourceExists(dirname); MavenProject bean = readFile(dirname); Node node = mapInput(bean); node.setProperty(Constants.SCOPE, "input"); bean.getModules().forEach(module -> { Node child = readPom(dirname + "/" + module); dependencyGraph.addDependency(node, child, DependencyType.CONTAINS); } MavenInputReader(DependencyGraph dependencyGraph); Node readPom(String dirname);  }