devonfw / sonar-devon4j-plugin

Plugin for SonarQube to validate devonfw architecture
Apache License 2.0
10 stars 16 forks source link

Support domain layer #131

Open hohwille opened 3 years ago

hohwille commented 3 years ago

Currently the layer for connecting with database is called dataaccess. This is compliant with the classic project structure. However, with the modern project structure the layer has been renamed to domain.

This story is about changing this sonar-devon4j-plugin so that domain is accepted as synonym to dataaccess. If we already change this, we should also accept persistence as a synonym as well that is used by RegisterFactory / IsyFact. This is already archivable via custom configuration in architecture.json but should be supported out of the box with the default config. See also https://github.com/devonfw/sonar-devon4j-plugin/blob/master/src/main/java/com/devonfw/ide/sonarqube/common/api/config/DevonPackageImpl.java

A JUnit test has to be part of this story that tests multiple Java packages with default configuration (new Configuration()) via DevonPackageImpl. It should test the three layers valid for dataaccess/domain layer as well as a the other valid layers (service, logic, common) and also an invalid layer (e.g. with typo such as domian) and assert proper expected results.