-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ensureAllClassesAreContainedInLayers()
to Architectures
#278
Add ensureAllClassesAreContainedInLayers()
to Architectures
#278
Conversation
👉 View analysis in DeepCode’s Dashboard |
1bbe5c9
to
58ff904
Compare
@codecholeric can you take a look at this and let me know how it compares to what you imagined? I'm fairly new to ArchUnit and wanted to double check the direction before going much further. |
archunit/src/test/java/com/tngtech/archunit/library/ArchitecturesTest.java
Outdated
Show resolved
Hide resolved
archunit/src/main/java/com/tngtech/archunit/library/Architectures.java
Outdated
Show resolved
Hide resolved
archunit/src/test/java/com/tngtech/archunit/library/ArchitecturesTest.java
Outdated
Show resolved
Hide resolved
Thanks a lot for looking into this 😃 I've added a couple of thoughts, in particular I think it is important that we compare this to #273, since this feels to me like two sides of the same coin, don't you think? Both deal with a kind of configuration of how I want to test the layered architecture. |
Thanks for the review. I agree this relates very closely to #273 and that consistency is important. I'll take a closer look at the code there and try to bring my branch in line with that one. |
11fde7d
to
3525437
Compare
3525437
to
16b2686
Compare
16b2686
to
3adc6d3
Compare
Hi, @codecholeric |
3adc6d3
to
4c3df05
Compare
Hey, I took the liberty to fix up and finalize this PR, since it seemed a little orphaned to me 😉 Hope that's alright with you!! |
ensureAllClassesAreContainedInLayers()
to Architectures
ensureAllClassesAreContainedInLayers()
to ArchitecturesensureAllClassesAreContainedInLayers()
to Architectures
ensureAllClassesAreContainedInLayers()
to Architectures
ensureAllClassesAreContainedInLayers()
to Architectures
Please feel free! I've changed jobs since starting this, and although I've introduced use of ArchUnit, we don't have a strong layered architecture so this has become a very low priority 😕 |
No worries, I somehow completely lost track 🙈 But I think this will be a really nice addition that users will appreciate 🙂 |
This will give users the possibility to ensure that they have not missed any classes of the application when defining a `layeredArchitecture()`. Signed-off-by: Rob Oxspring <[email protected]>
This will give users the possibility to ensure that they have not missed any classes of the application when defining an `onionArchitecture()`. Signed-off-by: Rob Oxspring <[email protected]>
4c3df05
to
3352e33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice and simple addition which will help in our project as we are right within a transition from layer to onion :-)
Nice!👌 |
This will add possibilities to ensure that all classes under test are contained within the respective
LayeredArchitecture
/OnionArchitecture
. It will help users to make sure they don't overlook any classes when defining their architectures. Furthermore, it will help with maintainability of the architectures when new classes are added to the code base later on. In detail the following methods have been added toLayeredArchitecture
andOnionArchitecture
:ensureAllClassesAreContainedInArchitecture()
ensureAllClassesAreContainedInArchitectureIgnoring(packageIdentifiers)
ensureAllClassesAreContainedInArchitectureIgnoring(predicate)
Resolves #222