TNG / ArchUnitNET

A C# architecture test library to specify and assert architecture rules in C# for automated testing.
Apache License 2.0
927 stars 61 forks source link

PlantUml components grouping support #213

Open decarufe opened 1 year ago

decarufe commented 1 year ago

To simpify diagram it would be nice to support all grouping keywords

For example in the folling diagram I commented all direct component dependecies and use grouping dependencies instead.

@startuml Architecture Diagram
package ApplicationGroup {
  [Application] <<TheServiceName.WebApi.*>>
}

package DomainGroup {
  [Domain] <<TheServiceName.Domain.*>>
  [Infrastructure] <<TheServiceName.Infra.*>>
  [Databases] <<TheServiceName.Database.*>>
}

package AbstractionsGroup {
  [Abstractions] <<TheServiceName.Abstraction.*>>
}

' These components dependencies are inferred by the package dependencies
' Application --> Databases
' Application --> Infrastructure
' Application --> Domain
ApplicationGroup --> DomainGroup

' These components dependencies are inferred by the package dependencies
' Databases --> Abstractions
' Infrastructure --> Abstractions
' Domain --> Abstractions
Infrastructure -> Domain
DomainGroup --> AbstractionsGroup

' Infer dependencies: Because ApplicationGroup depends on DomainGroup, and DomainGroup depends on AbstractionsGroup, then ApplicationGroup depends on AbstractionsGroup
' Application --> Abstractions
' ApplicationGroup --> AbstractionsGroup

@enduml

I expect: