@Test public void testCreateArchitectureOnePackage() { DependencyGraph dependencyGraph = DependencyGraphFactory.createGraph(); dependencyGraph.getOrCreateNodeByName("ClassInDefaultPackage"); Architecture architecture = new DefaultPackageArchitectureFactory(dependencyGraph).createArchitecture(); assertThat(architecture.getName(), is("Package")); assertThat(architecture.getAllComponents(), hasSize(1)); assertThat(getComponentNameList(architecture), is(Lists.newArrayList("ClassInDefaultPackage"))); assertThat(architecture.getParentComponent("ClassInDefaultPackage"), is(architecture)); assertThat(architecture.getParentComponent("anythingElse"), nullValue()); }
public Architecture createArchitecture() { return createArchitecture(0); }
DefaultPackageArchitectureFactory { public Architecture createArchitecture() { return createArchitecture(0); } }
DefaultPackageArchitectureFactory { public Architecture createArchitecture() { return createArchitecture(0); } DefaultPackageArchitectureFactory(DependencyGraph dependencyGraph); }
DefaultPackageArchitectureFactory { public Architecture createArchitecture() { return createArchitecture(0); } DefaultPackageArchitectureFactory(DependencyGraph dependencyGraph); void setArchitectureName(String architectureName); void setPathSeparator(String separator); Architecture createArchitecture(); Architecture createArchitecture(int maxLength); }
DefaultPackageArchitectureFactory { public Architecture createArchitecture() { return createArchitecture(0); } DefaultPackageArchitectureFactory(DependencyGraph dependencyGraph); void setArchitectureName(String architectureName); void setPathSeparator(String separator); Architecture createArchitecture(); Architecture createArchitecture(int maxLength);  }