Skip to content

Commit

Permalink
#148 - Polish component diagram generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Oct 6, 2021
1 parent a7ac429 commit 6862830
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/test/java/videoshop/VideoshopModularityTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,20 @@ void assertModularity() {
@Test // #120
void writeComponentDiagrams() throws IOException {

Options options = Options.defaults() //
var options = Options.defaults() //
.withColorSelector(this::getColorForModule) //
.withDefaultDisplayName(this::getModuleDisplayName) //
.withTargetOnly(isSalespointModule);

Documenter documenter = new Documenter(modules);
var documenter = new Documenter(modules);
documenter.writeModulesAsPlantUml(options);
documenter.writeModuleCanvases(null);

modules.stream().filter(isSalespointModule.negate()) //
.forEach(it -> documenter.writeModuleAsPlantUml(it, options));
documenter.writeModuleCanvases();
documenter.writeIndividualModulesAsPlantUml(options);
}

private Optional<String> getColorForModule(Module module) {

String packageName = module.getBasePackage().getName();
var packageName = module.getBasePackage().getName();

if (packageName.startsWith("org.salespoint")) {
return Optional.of("#ddddff");
Expand Down

0 comments on commit 6862830

Please sign in to comment.