Skip to content
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

fix OnionArchitecture losing optionalLayers after as #1226

Merged
merged 2 commits into from
Mar 24, 2024

Conversation

codecholeric
Copy link
Collaborator

The OnionArchitecture.as(..) method (and transitively because(..)) didn't pass the optionalLayers property along when creating a new OnionArchitecture(..) on return. Thus, once a test called as(..) or because(..) on the rule text optionalLayers would be reset to false.

Resolves: #1185

Copy link
Member

@hankem hankem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing what I overlooked in #273!

@codecholeric
Copy link
Collaborator Author

Thanks for fixing what I overlooked in #273!

Well... 🤷‍♂️ "codecholeric approved these changes on Jan 9, 2020"

The `OnionArchitecture.as(..)` method (and transitively `because(..)`) didn't pass the `optionalLayers` property along when creating a `new OnionArchitecture(..)` on return.
Thus, once a test called `as(..)` or `because(..)` on the rule text `optionalLayers` would be reset to `false`.

Signed-off-by: Peter Gafert <peter.gafert@archunit.org>
@codecholeric codecholeric force-pushed the fix-optional-layers-getting-lost branch from 7d5dc15 to 8f11837 Compare March 24, 2024 22:29
The `OnionArchitecture.as(..)` method (and transitively `because(..)`) didn't pass the `allClassesAreContainedInArchitectureCheck` property along
when creating a `new OnionArchitecture(..)` on return.
Thus, once a test called `as(..)` or `because(..)` on the rule text `allClassesAreContainedInArchitectureCheck` would be reset to `Disabled`.

Signed-off-by: Peter Gafert <peter.gafert@archunit.org>
@codecholeric codecholeric merged commit fc18fa9 into main Mar 24, 2024
21 checks passed
@codecholeric codecholeric deleted the fix-optional-layers-getting-lost branch March 24, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants