@Test public void testHello() { assertThat(graphController.getInfo().getInfo(), startsWith("Graph with: 5 nodes and 3 edges. Filename: ")); assertThat(graphController.getInfo().getInfo(), endsWith("testGraph1.json")); }
@GetMapping(value = "/info") public GraphInfoDTO getInfo() { String info = String.format("Graph with: %d nodes and %d edges. Filename: %s", dependencyGraph.getAllNodes().size(), dependencyGraph.getAllEdges().size(), FileNameUtil.getCanonicalPath(filename)); LOGGER.info("Request to /info: {}", info); GraphInfoDTO result = new GraphInfoDTO(); result.setInfo(info); return result; }
GraphController { @GetMapping(value = "/info") public GraphInfoDTO getInfo() { String info = String.format("Graph with: %d nodes and %d edges. Filename: %s", dependencyGraph.getAllNodes().size(), dependencyGraph.getAllEdges().size(), FileNameUtil.getCanonicalPath(filename)); LOGGER.info("Request to /info: {}", info); GraphInfoDTO result = new GraphInfoDTO(); result.setInfo(info); return result; } }
GraphController { @GetMapping(value = "/info") public GraphInfoDTO getInfo() { String info = String.format("Graph with: %d nodes and %d edges. Filename: %s", dependencyGraph.getAllNodes().size(), dependencyGraph.getAllEdges().size(), FileNameUtil.getCanonicalPath(filename)); LOGGER.info("Request to /info: {}", info); GraphInfoDTO result = new GraphInfoDTO(); result.setInfo(info); return result; }  }
GraphController { @GetMapping(value = "/info") public GraphInfoDTO getInfo() { String info = String.format("Graph with: %d nodes and %d edges. Filename: %s", dependencyGraph.getAllNodes().size(), dependencyGraph.getAllEdges().size(), FileNameUtil.getCanonicalPath(filename)); LOGGER.info("Request to /info: {}", info); GraphInfoDTO result = new GraphInfoDTO(); result.setInfo(info); return result; }  @Value("${de.qaware.qav.graph.filename}") void setFilename(String filename); @PostConstruct void init(); @GetMapping(value = "/info") GraphInfoDTO getInfo(); @GetMapping(value = "/node") NodeDTO getNode(@RequestParam(value = "name") String name); @GetMapping(value = "/edge") DependencyDTO getEdge(@RequestParam("from") String from,
                                 @RequestParam("to") String to); @GetMapping(value = "/nodes") Page<Node> getNodes(@RequestParam(value = "q", required = false) String query,
                               Pageable pageable); }
GraphController { @GetMapping(value = "/info") public GraphInfoDTO getInfo() { String info = String.format("Graph with: %d nodes and %d edges. Filename: %s", dependencyGraph.getAllNodes().size(), dependencyGraph.getAllEdges().size(), FileNameUtil.getCanonicalPath(filename)); LOGGER.info("Request to /info: {}", info); GraphInfoDTO result = new GraphInfoDTO(); result.setInfo(info); return result; }  @Value("${de.qaware.qav.graph.filename}") void setFilename(String filename); @PostConstruct void init(); @GetMapping(value = "/info") GraphInfoDTO getInfo(); @GetMapping(value = "/node") NodeDTO getNode(@RequestParam(value = "name") String name); @GetMapping(value = "/edge") DependencyDTO getEdge(@RequestParam("from") String from,
                                 @RequestParam("to") String to); @GetMapping(value = "/nodes") Page<Node> getNodes(@RequestParam(value = "q", required = false) String query,
                               Pageable pageable);  }