@Test public void testDescribeDomain_simpleInheritance() throws ClassNotFoundException { domainMapper = new DomainMapper(Arrays.<Class<?>>asList(Manager.class, Person.class)); String description = DOMAIN_DECLARATION + DEFAULTS + "\n subgraph cluster_0 {\n label = \"com.nitorcreations.testdomain.person\";\n Manager\n Person\n }\n Manager -> Person [arrowhead=empty color=slategray];\n}"; assertThat(domainMapper.describeDomain(), is(description)); }
public String describeDomain() throws ClassNotFoundException { List<Edge> edges = new ArrayList<>(); edges.addAll(fieldScanner.getEdges()); edges.addAll(hierarchyScanner.getEdges()); List<DomainObject> domainObjects = classes.stream().map(DomainObject::new).collect(Collectors.toList()); return presenter.describe(domainObjects, edges); }
DomainMapper { public String describeDomain() throws ClassNotFoundException { List<Edge> edges = new ArrayList<>(); edges.addAll(fieldScanner.getEdges()); edges.addAll(hierarchyScanner.getEdges()); List<DomainObject> domainObjects = classes.stream().map(DomainObject::new).collect(Collectors.toList()); return presenter.describe(domainObjects, edges); } }
DomainMapper { public String describeDomain() throws ClassNotFoundException { List<Edge> edges = new ArrayList<>(); edges.addAll(fieldScanner.getEdges()); edges.addAll(hierarchyScanner.getEdges()); List<DomainObject> domainObjects = classes.stream().map(DomainObject::new).collect(Collectors.toList()); return presenter.describe(domainObjects, edges); } DomainMapper(final List<Class<?>> classes); }
DomainMapper { public String describeDomain() throws ClassNotFoundException { List<Edge> edges = new ArrayList<>(); edges.addAll(fieldScanner.getEdges()); edges.addAll(hierarchyScanner.getEdges()); List<DomainObject> domainObjects = classes.stream().map(DomainObject::new).collect(Collectors.toList()); return presenter.describe(domainObjects, edges); } DomainMapper(final List<Class<?>> classes); String describeDomain(); List<Class<?>> getClasses(); static DomainMapper create(List<String> packages, URLClassLoader classLoader); static DomainMapper create(final List<String> packages); }
DomainMapper { public String describeDomain() throws ClassNotFoundException { List<Edge> edges = new ArrayList<>(); edges.addAll(fieldScanner.getEdges()); edges.addAll(hierarchyScanner.getEdges()); List<DomainObject> domainObjects = classes.stream().map(DomainObject::new).collect(Collectors.toList()); return presenter.describe(domainObjects, edges); } DomainMapper(final List<Class<?>> classes); String describeDomain(); List<Class<?>> getClasses(); static DomainMapper create(List<String> packages, URLClassLoader classLoader); static DomainMapper create(final List<String> packages);  }