@Test public void snitch() { Dependency d1 = Dependency.on(Component.of("cards", "game")); Consumer c1 = Consumer.by(Component.of("angel", "superhero")); ComponentRelationships rels = ComponentRelationships.builder().component(Component.of("gambit", "xmen")) .addDependency(d1).addConsumer(c1).build(); Mockito.when(analyzer.analyzeSystem()).thenReturn(SystemFragment.of(rels)); SystemFragment actual = endpoint.snitch(); Set<Dependency> dependencies = new HashSet<>(Arrays.asList(d1)); Set<Consumer> consumers = new HashSet<>(Arrays.asList(c1)); ComponentRelationships r = ComponentRelationships.of(Component.of("gambit", "xmen"), dependencies, consumers); SystemFragment expected = SystemFragment.of(r); Assert.assertEquals(expected, actual); }
@RequestMapping(method = RequestMethod.GET) @ResponseBody @Override public SystemFragment snitch() { return applicationAnalyzer.analyzeSystem(); }
CereebroSnitchMvcEndpoint extends AbstractMvcEndpoint implements SnitchEndpoint { @RequestMapping(method = RequestMethod.GET) @ResponseBody @Override public SystemFragment snitch() { return applicationAnalyzer.analyzeSystem(); } }
CereebroSnitchMvcEndpoint extends AbstractMvcEndpoint implements SnitchEndpoint { @RequestMapping(method = RequestMethod.GET) @ResponseBody @Override public SystemFragment snitch() { return applicationAnalyzer.analyzeSystem(); } CereebroSnitchMvcEndpoint(ApplicationAnalyzer analyzer); }
CereebroSnitchMvcEndpoint extends AbstractMvcEndpoint implements SnitchEndpoint { @RequestMapping(method = RequestMethod.GET) @ResponseBody @Override public SystemFragment snitch() { return applicationAnalyzer.analyzeSystem(); } CereebroSnitchMvcEndpoint(ApplicationAnalyzer analyzer); @Override URI getUri(); @RequestMapping(method = RequestMethod.GET) @ResponseBody @Override SystemFragment snitch(); }
CereebroSnitchMvcEndpoint extends AbstractMvcEndpoint implements SnitchEndpoint { @RequestMapping(method = RequestMethod.GET) @ResponseBody @Override public SystemFragment snitch() { return applicationAnalyzer.analyzeSystem(); } CereebroSnitchMvcEndpoint(ApplicationAnalyzer analyzer); @Override URI getUri(); @RequestMapping(method = RequestMethod.GET) @ResponseBody @Override SystemFragment snitch(); static final String DEFAULT_PATH; }